Windows 10 Creators Update and Symlinks

Corinna Vinschen corinna-cygwin@cygwin.com
Mon Apr 24 20:58:00 GMT 2017


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="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)))
> > [...]
> 
> 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.
> 
> 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.
> 
> 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="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

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170424/ce3bc450/attachment.sig>


More information about the Cygwin mailing list