Brian and Thomas,
Thanks to both of you for providing this info. On Mar 26 13:12, Brian Inglis wrote: > On 2020-03-26 05:00, Corinna Vinschen wrote: > > On Mar 26 10:00, Thomas Wolff wrote: > >> A symbolic link created with WSL is neither interpreted in cygwin nor can > >> it > >> be deleted: > >>> touch file > >>> wsl ln -s file link > >>> wsl ls -l link > >> lrwxrwxrwx 1 towo towo 1 Mar 26 08:56 link -> file > >>> ls -l link > >> -rw-r----- 1 Unknown+User Unknown+Group 0 Mar 26 00:00 link > > What kind of file are they in the real world? Reparse points? If so, > > what content do they have? I attached a Q&D source from my vault > > of old test apps to check on reparse point content. Please compile with > > gcc -g ../src/rd-reparse.c -o rd-reparse -lntdll > > It takes a single native NT path as parameter, kind of like this: > > ./rd-reparse '\??\C:\cygwin64\home\corinna\link' > > They should be WSL or Windows mklink (soft) links, and the reason why mklink > was > allowed unelevated in Windows 10 with Developer mode. > > In an *elevated* shell: > > $ ls -dln u > -rw-r----- 1 4294967295 4294967295 0 Nov 9 06:09 u > $ getfacl u > getfacl: u: Permission denied > $ icacls u > u NULL SID:(DENY)(Rc,S,REA,WEA,X,DC) > $HOSTNAME\$USER:(F) > $HOSTNAME\$USER:(RX,W,DC) > BUILTIN\Users:(Rc,S,RA) > BUILTIN\Administrators:(RX,W,DC) > BUILTIN\Users:(DENY)(S,RD,REA,X) > Everyone:(RX) > NT AUTHORITY\SYSTEM:(I)(F) > BUILTIN\Administrators:(I)(F) > $HOSTNAME\$USER:(I)(F) > > Successfully processed 1 files; Failed processing 0 files > $ ./rd-reparse '\??\C:\...\u' > ReparseTag: 0xa000001d ^^^^^^^^^^ This is a reparse point tag different from the normal Windows symlink reparse point tag, 0xa000000c. Searching for this value shows this is defined in ntifs.h as IO_REPARSE_TAG_LX_SYMLINK. Unfortunately I don't see a definition of the reparse point data for that reparse point type. In your examples the data part looks like a 4 byte int value, being 2 in both of your examples, maybe a file type, followed by the path in multibyte, no trailing \0. Unfortunately, in both cases the path is relative, just the file name it points to. To get more information, could one of you two please create a few more symlinks? - A symlink pointing to a local path, given in absolute path syntax. I assume the path will be in POSIX syntax, contain slashes, but it would be helpful to see it. - A symlink with a target path pointing to a remote file (what syntax does this use?) - Last but not least, could you please create a symlink pointing to a target with a non-ASCII char, e. g., some german umlaut? It's questionable if supporting this new symlink type makes sense, but taking a closer look doesn't hurt, I guess. Thanks, Corinna -- Corinna Vinschen Cygwin Maintainer
signature.asc
Description: PGP signature
-- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple