Hi Jean-Pierre,

> >> getfattr simply fails with EIO when I try to issue the commands you
> >> requested. I did run ntfsinfo on the symlinks though. I have included
> >
> > That is strange. Maybe you did not use the -h option of fgetattr ?
It seems the ntfs-3g packaged by Debian was not functioning properly.
With the tarball you gave me it works properly.

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

[0] https://docs.microsoft.com/en-us/windows/wsl/file-permissions

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
Dumping Inode 35 (0x23)
Upd. Seq. Array Off.: 48 (0x30)
Upd. Seq. Array Count: 3 (0x3)
Upd. Seq. Number: 3 (0x3)
LogFile Seq. Number: 0x102caa
MFT Record Seq. Numb.: 1 (0x1)
Number of Hard Links: 1 (0x1)
Attribute Offset: 56 (0x38)
MFT Record Flags: IN_USE
Bytes Used: 440 (0x1b8) bytes
Bytes Allocated: 1024 (0x400) bytes
Next Attribute Instance: 6 (0x6)
MFT Padding: 00 00
Dumping attribute $STANDARD_INFORMATION (0x10) from mft record 35 (0x23)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 0 (0x0)
Data size: 72 (0x48)
Resident flags: 0x00
File Creation Time: Sun Jan 10 10:34:55 2021 UTC
File Altered Time: Sun Jan 10 10:34:55 2021 UTC
MFT Changed Time: Sun Jan 10 10:34:55 2021 UTC
Last Accessed Time: Sun Jan 10 10:34:55 2021 UTC
File attributes: ARCHIVE REPARSE_POINT UNKNOWN: 0x00040000 (0x00040420)
Maximum versions: 0
Version number: 0
Class ID: 0
User ID: 0 (0x0)
Security ID: 260 (0x104)
Quota charged: 0 (0x0)
Update Sequence Number: 0 (0x0)
Dumping attribute $FILE_NAME (0x30) from mft record 35 (0x23)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 2 (0x2)
Data size: 74 (0x4a)
Resident flags: 0x01
Parent directory: 5 (0x5)
File Creation Time: Sun Jan 10 10:34:55 2021 UTC
File Altered Time: Sun Jan 10 10:34:55 2021 UTC
MFT Changed Time: Sun Jan 10 10:34:55 2021 UTC
Last Accessed Time: Sun Jan 10 10:34:55 2021 UTC
Allocated Size: 0 (0x0)
Data Size: 0 (0x0)
Filename Length: 4 (0x4)
File attributes: ARCHIVE (0x00000020)
Namespace: POSIX
Filename: 'fifo'
Dumping attribute $DATA (0x80) from mft record 35 (0x23)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 1 (0x1)
Data size: 0 (0x0)
Resident flags: 0x00
Dumping attribute $REPARSE_POINT (0xc0) from mft record 35 (0x23)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 3 (0x3)
Data size: 8 (0x8)
Resident flags: 0x00
Reparse tag: 0x80000024 (Linux fifo)
Data length: 0 (0x0)
Data: (NONE)
Dumping attribute $EA_INFORMATION (0xd0) from mft record 35 (0x23)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 4 (0x4)
Data size: 8 (0x8)
Resident flags: 0x00
Packed EA length: 45 (0x2d)
NEED_EA count: 0 (0x0)
Unpacked EA length: 60 (0x3c)
Dumping attribute $EA (0xe0) from mft record 35 (0x23)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 5 (0x5)
Data size: 60 (0x3c)
Resident flags: 0x00
End of inode reached

$ src/ntfs-3g_ntfsprogs-2017.3.23AB.6/ntfsprogs/ntfsinfo -F block links.img
Dumping Inode 36 (0x24)
Upd. Seq. Array Off.: 48 (0x30)
Upd. Seq. Array Count: 3 (0x3)
Upd. Seq. Number: 3 (0x3)
LogFile Seq. Number: 0x181045
MFT Record Seq. Numb.: 2 (0x2)
Number of Hard Links: 1 (0x1)
Attribute Offset: 56 (0x38)
MFT Record Flags: IN_USE
Bytes Used: 464 (0x1d0) bytes
Bytes Allocated: 1024 (0x400) bytes
Next Attribute Instance: 6 (0x6)
MFT Padding: 00 00
Dumping attribute $STANDARD_INFORMATION (0x10) from mft record 36 (0x24)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 0 (0x0)
Data size: 72 (0x48)
Resident flags: 0x00
File Creation Time: Wed Jan 13 08:40:56 2021 UTC
File Altered Time: Wed Jan 13 08:40:56 2021 UTC
MFT Changed Time: Wed Jan 13 08:40:56 2021 UTC
Last Accessed Time: Wed Jan 13 08:40:56 2021 UTC
File attributes: ARCHIVE REPARSE_POINT UNKNOWN: 0x00040000 (0x00040420)
Maximum versions: 0
Version number: 0
Class ID: 0
User ID: 0 (0x0)
Security ID: 260 (0x104)
Quota charged: 0 (0x0)
Update Sequence Number: 0 (0x0)
Dumping attribute $FILE_NAME (0x30) from mft record 36 (0x24)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 2 (0x2)
Data size: 76 (0x4c)
Resident flags: 0x01
Parent directory: 5 (0x5)
File Creation Time: Wed Jan 13 08:40:56 2021 UTC
File Altered Time: Wed Jan 13 08:40:56 2021 UTC
MFT Changed Time: Wed Jan 13 08:40:56 2021 UTC
Last Accessed Time: Wed Jan 13 08:40:56 2021 UTC
Allocated Size: 0 (0x0)
Data Size: 0 (0x0)
Filename Length: 5 (0x5)
File attributes: ARCHIVE (0x00000020)
Namespace: POSIX
Filename: 'block'
Dumping attribute $DATA (0x80) from mft record 36 (0x24)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 1 (0x1)
Data size: 0 (0x0)
Resident flags: 0x00
Dumping attribute $REPARSE_POINT (0xc0) from mft record 36 (0x24)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 3 (0x3)
Data size: 8 (0x8)
Resident flags: 0x00
Reparse tag: 0x80000026 (Linux block device)
Data length: 0 (0x0)
Data: (NONE)
Dumping attribute $EA_INFORMATION (0xd0) from mft record 36 (0x24)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 4 (0x4)
Data size: 8 (0x8)
Resident flags: 0x00
Packed EA length: 64 (0x40)
NEED_EA count: 0 (0x0)
Unpacked EA length: 84 (0x54)
Dumping attribute $EA (0xe0) from mft record 36 (0x24)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 5 (0x5)
Data size: 84 (0x54)
Resident flags: 0x00
End of inode reached

$ src/ntfs-3g_ntfsprogs-2017.3.23AB.6/ntfsprogs/ntfsinfo -F char links.img
Dumping Inode 37 (0x25)
Upd. Seq. Array Off.: 48 (0x30)
Upd. Seq. Array Count: 3 (0x3)
Upd. Seq. Number: 2 (0x2)
LogFile Seq. Number: 0x181190
MFT Record Seq. Numb.: 2 (0x2)
Number of Hard Links: 1 (0x1)
Attribute Offset: 56 (0x38)
MFT Record Flags: IN_USE
Bytes Used: 464 (0x1d0) bytes
Bytes Allocated: 1024 (0x400) bytes
Next Attribute Instance: 6 (0x6)
MFT Padding: 00 00
Dumping attribute $STANDARD_INFORMATION (0x10) from mft record 37 (0x25)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 0 (0x0)
Data size: 72 (0x48)
Resident flags: 0x00
File Creation Time: Wed Jan 13 08:41:05 2021 UTC
File Altered Time: Wed Jan 13 08:41:05 2021 UTC
MFT Changed Time: Wed Jan 13 08:41:05 2021 UTC
Last Accessed Time: Wed Jan 13 08:41:05 2021 UTC
File attributes: ARCHIVE REPARSE_POINT UNKNOWN: 0x00040000 (0x00040420)
Maximum versions: 0
Version number: 0
Class ID: 0
User ID: 0 (0x0)
Security ID: 260 (0x104)
Quota charged: 0 (0x0)
Update Sequence Number: 0 (0x0)
Dumping attribute $FILE_NAME (0x30) from mft record 37 (0x25)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 2 (0x2)
Data size: 74 (0x4a)
Resident flags: 0x01
Parent directory: 5 (0x5)
File Creation Time: Wed Jan 13 08:41:05 2021 UTC
File Altered Time: Wed Jan 13 08:41:05 2021 UTC
MFT Changed Time: Wed Jan 13 08:41:05 2021 UTC
Last Accessed Time: Wed Jan 13 08:41:05 2021 UTC
Allocated Size: 0 (0x0)
Data Size: 0 (0x0)
Filename Length: 4 (0x4)
File attributes: ARCHIVE (0x00000020)
Namespace: POSIX
Filename: 'char'
Dumping attribute $DATA (0x80) from mft record 37 (0x25)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 1 (0x1)
Data size: 0 (0x0)
Resident flags: 0x00
Dumping attribute $REPARSE_POINT (0xc0) from mft record 37 (0x25)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 3 (0x3)
Data size: 8 (0x8)
Resident flags: 0x00
Reparse tag: 0x80000025 (Linux character device)
Data length: 0 (0x0)
Data: (NONE)
Dumping attribute $EA_INFORMATION (0xd0) from mft record 37 (0x25)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 4 (0x4)
Data size: 8 (0x8)
Resident flags: 0x00
Packed EA length: 64 (0x40)
NEED_EA count: 0 (0x0)
Unpacked EA length: 84 (0x54)
Dumping attribute $EA (0xe0) from mft record 37 (0x25)
Resident: Yes
Attribute flags: 0x0000
Attribute instance: 5 (0x5)
Data size: 84 (0x54)
Resident flags: 0x00
End of inode reached

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