From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103158 invoked by alias); 24 Apr 2017 16:09:43 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 100317 invoked by uid 89); 24 Apr 2017 16:09:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-101.9 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Permission, offline, hear X-HELO: drew.franken.de Received: from mail-n.franken.de (HELO drew.franken.de) (193.175.24.27) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 24 Apr 2017 16:09:41 +0000 Received: from aqua.hirmke.de (aquarius.franken.de [193.175.24.89]) (Authenticated sender: aquarius) by mail-n.franken.de (Postfix) with ESMTPSA id F2122721E281A for ; Mon, 24 Apr 2017 18:09:39 +0200 (CEST) Received: from calimero.vinschen.de (calimero.vinschen.de [192.168.129.6]) by aqua.hirmke.de (Postfix) with ESMTP id 6018A5E00E4 for ; Mon, 24 Apr 2017 18:09:39 +0200 (CEST) Received: by calimero.vinschen.de (Postfix, from userid 500) id 4157DA80458; Mon, 24 Apr 2017 18:09:39 +0200 (CEST) Date: Mon, 24 Apr 2017 20:58:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Windows 10 Creators Update and Symlinks Message-ID: <20170424160939.GC8532@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <4b5447f2-a1fe-925e-5e3d-6692347374ad@kit.edu> <60bf66d9-d467-3cac-72f9-7823d1c1c32a@teco.edu> <3e2df893-9813-2f1b-ad0b-f7e6fa5cdc19@SystematicSw.ab.ca> <20170424090930.GA8532@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7qSK/uQB79J36Y4o" Content-Disposition: inline In-Reply-To: <20170424090930.GA8532@calimero.vinschen.de> User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-04/txt/msg00317.txt.bz2 --7qSK/uQB79J36Y4o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2162 On Apr 24 11:09, Corinna Vinschen wrote: > On Apr 23 09:21, Brian Inglis wrote: > > On 2017-04-23 03:26, Till Riedel wrote: > > > I was really excited to hear this! > > > I tried to export CYGWIN=3D"winsymlinks:nativestrict" and create > > > symlink without elevation and failed on cygwin 2.8.0 (checked that > > > "cmd /C mklink" works as expected in Windows 10 Creators Update > > > Developer Mode). > > > Any ideas if there are any extra checks that lead to "Operation not > > > permitted"? > > > Windows seemingly even allows symlinks to nonexistent files (I > > > somehow think there was a problem with that in the past). For me > > > personally this would a strong reason to switch to real symlinks. > > [...] > > if (!CreateSymbolicLinkW (final_newpath->Buffer, final_oldpath->Buffer, > > #ifdef SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE > > SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE | > > #endif > > (win32_oldpath.isdir () > > ? SYMBOLIC_LINK_FLAG_DIRECTORY : 0))) > > [...] >=20 > Unfortunately the flag can't be used blindly because older versions of > Windows will return ERROR_INVALID_PARAMETER when adding this flag, so we > definitely need a version check. >=20 > I'm also running an Enterprise edition of W10 which didn't get the > Creator's update yet and the "Update Assistant" doesn't support the > Enterprise edition either. >=20 > I'm also going offline for all of May, so this might take a bit. Having said that, I just added code to handle this new flag(*) and uploaded new developer snapshots to https://cygwin.com/snapshots/ Please test. What I'm especially interested in is this: Assuming you're running W10 1703, and further assuming you did NOT activate the developers option. Running this in a non-elevated shell: $ export CYGWIN=3D"winsymlinks:nativestrict" $ ln -s foo bar should always fail then, just like on previous versions of Windows. The question is this: What error do you get? "Permission denied" or "Invalid argument"? Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --7qSK/uQB79J36Y4o Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJY/iNDAAoJEPU2Bp2uRE+g7FoP/1KeDXupUwGHF0A6tVIvzsPr AK7diG1l8K/khc46lElMAQcffGdItpSvwudNkHJp12QqHzTJypUtdFDQtzLLLwe6 4emZM9+kHeKDIx7XsFFn31AwlgZoWZCAie8IyJ20ZAaLAskmfB3pcRufXvurjkP9 BQZiXdp6M6XJgdKpxmJ9grx33WX4/dltBPj2pdEnfwxhvxHWqmP6MLXmGrexeSUC ZVB5zkk88+nEcude5ozXAz2JL92vgBVWur+WyeQsNpBoGIVsJbCmTnlooSWO0tct sW28Ot01vSpzlU9r76whT6XQ9EdhA3s2GbupdfStv/IFIchIFKtNTEB/vbF/hWp4 1d0iLv4DE2SGJjcjQQIdApkR3lLZomGcE5sY/LPpP+fIzMylt1qLBXVDVtJv4nns MY5ZVwRnc4QoWZs8VIyFut0NRg7eehUQ7en9KbNgrZrJPgrX7s/djGPKcTcPj1Bb t3JEEChdiESRv2N0FrDGc+pWF0GHKSUMw3SMzHGdewyiZES8AAzeklRQRrge+iPw Q3YQAOlC4v8rZ1hPTVmQDUt0CSywdXphDdOIK4iPkE9tPTYm2PQzVmclU2GGxacY c3h6W4VOyCH0AiLvXu6rb3g58nWoAPHSW2a2PtNjE4HngoX4I9ogS5QXcpoNknIH 4C01idVveLggO/2nuI9q =1mcy -----END PGP SIGNATURE----- --7qSK/uQB79J36Y4o--