This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windows 10 Creators Update and Symlinks

On Apr 23 09:21, Brian Inglis wrote:
> On 2017-04-23 03:26, Till Riedel wrote:
> > Am 13.04.2017 um 0:29 schrieb Jeffrey Altman:
> >> When Developer mode is enabled the elevation requirement for
> >> symlink creation is disabled:
> >>
> >> This was necessary for symlink creation within WSL to work.
> > 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.
> Artcile states:
> CreateSymbolicLink
>     To enable the new behavior when using the CreateSymbolicLink API, 
> there is an additional dwFlags option you will need to set:
> Value 	Meaning
> 0x2 	Specify this flag to allow creation of symbolic links when the 
> 	process is not elevated
> So Cygwin patches are required to winsymlinks:native/strict handling 
> in winsup/w32api/include/winbase.h (which may be owned by mingw):
> and in winsup/cygwin/ like:
> /* Try to create native symlink. */
> if (!CreateSymbolicLinkW (final_newpath->Buffer, final_oldpath->Buffer,
> #endif
> 			  (win32_oldpath.isdir ()
> but may need W10 build 14972 checks, and any privilege checks disabled.

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.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]