> >> I have uploaded to
> >> https://jp-andre.pagesperso-orange.fr/ntfs-3g_ntfsprogs-2017.3.23AB.6-2.tgz
> >> a test version of ntfs-3g with support for WSL-type symlinks.
> >> This variant is enabled by using the mount option :
> >> special_files=wsl
> >> Both the Interix symlinks and the WSL ones are recognized
> >> irrespective of the option being used. The option only acts
> >> on new symlinks being created.
> >>
> >> Please test it, and report.
> >
> > Thanks! I'll test it and report back.
> >
> >>
> >> The sockets, fifos, character and block devices are also
> >> implemented the same way.... but I have no valid example
> >> of how WSL implements them, so this is probably plain wrong.
> >>
> >> Would you please use WSL to create some of them and post
> >> their ntfsinfo description :
> >>
> >> mknod path/fifo p
> >> mknod path/chr c 0x123 0x456
> >> mknod path/blk b 0x234 0x567
> >
> > WSL encodes fifos and block/character device files using NTFS extended
> > attributes. (For that matter, any file can have such extended
> > attributes attached to it, in order to encode properties such as its
> > permissions within WSL.) You can find more details about these here:
> > [0]
> >
> > I've created a test disk image here: https://ocf.io/kpengboy/links.img
> > It contains several files:
>
> Great job, thanks.
>
> >   - symlink: a symlink with the contents "abcéж我☃"
> >   - symlink-with-metadata: same as above, but with the WSL metadata
> > attached in the NTFS extended attributes
> >   - fifo
> >   - block, char: with major and minor numbers as requested in your email
> >   - stream-socket-maybe: I tried to bind a Unix socket to a file and
> >     this is the result. I may or may not have done it correctly. The result 
> > may
> >     or may not be meaningful.
>
> IMHO having compatible socket is only needed if you want to
> communicate between WSL and Linux as a guest on Windows....
>
> >
> > [0] https://docs.microsoft.com/en-us/windows/wsl/file-permissions
>
> So for devices, the major and minor number are inserted in an
> EA, with ownership and permissions. Then an important question
> is whether ownership and permissions are required for the device
> number to be taken into account (and more generally whether
> they are required for special files to be recognized by wsl).
>
> At this stage I am not to provide support for wsl-type ownership
> and permissions.
>
> What does wsl think of a fifo created by the test version of
> ntfs-3g ? is it at least shown as a fifo (probably owned by
> root and no permissions) ? It is also missing the flag 0x40000,
> which could be a requirement.

So I've tried creating some links and special files with the
special_files=wsl mount option, and reading those in WSL. WSL was
successfully able to read links I created to "dir", "file", "文件", and
"\x17\x15\ufffe\uffff". The fifos, block and char special devices look
like empty regular files to WSL though (with no permissions, and owned
by whichever user and group was specified in the DrvFS mount options).

>
> >
> > For completeness, I post the ntfsinfo of fifo, block, and char below:
> > $ src/ntfs-3g_ntfsprogs-2017.3.23AB.6/ntfsprogs/ntfsinfo -F fifo links.img
>
> FYI ntfsinfo shows the details of EA's in verbose mode
> (with option -v).

Thanks, I'll try that next time.

Best,
  Kevin


_______________________________________________
ntfs-3g-devel mailing list
ntfs-3g-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to