support for Cygwin XATTRs in NTFS3?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey.

Cygwin supports user.* XATTRs by encoding them somehow in Windows EAs.

Any chance to see support for reading these via ntfs3?

Maybe with default mount options, they could be mapped into some
special namespace (like cygwin.*) and with some special mount option
like xattr-profile=cygwin they could get mapped directly into user.* ?


I found only little information on how they do it.
There's a few words in
https://www.cygwin.com/cygwin-ug-net/cygwin-ug-net.pdf
on PDF page 4, chapter 1.6.3 File Access.

Other than that, one would probably have to resort to:
https://www.cygwin.com/git.html
where it seems in
winsup/cygwin/fhandler/disk_file.cc
winsup/cygwin/include/attr/xattr.h
winsup/cygwin/ntea.cc (which seems to contain the beef in read_ea())

ntfs-3g as some limited support for getting the data:
$ getfattr -n system.ntfs_ea test --only-values | hd
00000000  90 00 00 00 00 04 80 00  46 4f 4f 4f 00 37 32 66  |........FOOO.72f|
00000010  32 35 64 39 30 65 66 34  63 66 65 63 64 61 38 66  |25d90ef4cfecda8f|
00000020  61 32 63 34 37 35 36 31  61 66 35 61 66 30 61 31  |a2c47561af5af0a1|
00000030  30 61 39 32 62 66 64 31  35 39 38 36 62 31 66 39  |0a92bfd15986b1f9|
00000040  31 36 33 35 38 62 66 36  61 63 38 61 33 37 38 35  |16358bf6ac8a3785|
00000050  38 61 31 34 64 32 37 33  32 39 35 30 36 61 33 37  |8a14d27329506a37|
00000060  36 36 62 61 64 30 66 33  34 64 32 65 30 34 63 61  |66bad0f34d2e04ca|
00000070  66 33 39 37 63 31 36 30  37 62 34 33 38 30 65 62  |f397c1607b4380eb|
00000080  33 33 63 39 37 64 33 37  64 66 63 33 37 00 00 00  |33c97d37dfc37...|
00000090


Here, on test the following XATTR was set from Cygwin:

$ setfattr -n user.fooo -v
72f25d90ef4cfecda8fa2c47561af5af0a10a92bfd15986b1f916358bf6ac8a37858a14d27329506a3766bad0f34d2e04caf397c1607b4380eb33c97d37dfc37
test


Not sure whether support for FAT and exFAT is needed, because it seems
Cygwin itself cannot even set XATTRs on them.


Cheers,
Philippe




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux