delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/04/24/12:10:08

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=mENEa+AG6MwAxQO3mfBl27ntxjJbs30XVLgo851MhAseIr5DvHXOt
Wa67XylgB0w2dq+CvYuwVd+xOkj64+bNXCHvBVdMRdBpuoihgmjjtDDmBZP81CSn
a5paYelyxQUqnrq2DNqpmfzEc8b2grciv8MG1MRQR5qX/5+c6kifs4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=/cEeh6a20Ik1yGWx+i6EbrsZIko=; b=e9Gm3w9dHDDDfs+AbyrcziSa0MaN
dHJASE26AXtugkPm3IsDuaBk9jwdhBqz1r9XODFIbPwt47JBynYzPKeRm8yWKOcg
kshd8s9/nnUo1R1/UcruJngApD5WRwTcLUCTfmEDmLK6ahM4Q782U4Q9l9EQlqSc
dGxA/gfhIFZz16I=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Mon, 24 Apr 2017 18:09:39 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Windows 10 Creators Update and Symlinks
Message-ID: <20170424160939.GC8532@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4b5447f2-a1fe-925e-5e3d-6692347374ad AT kit DOT edu> <60bf66d9-d467-3cac-72f9-7823d1c1c32a AT teco DOT edu> <3e2df893-9813-2f1b-ad0b-f7e6fa5cdc19 AT SystematicSw DOT ab DOT ca> <20170424090930 DOT GA8532 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
In-Reply-To: <20170424090930.GA8532@calimero.vinschen.de>
User-Agent: Mutt/1.8.0 (2017-02-23)

--7qSK/uQB79J36Y4o
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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"

-----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--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019