From: Philippe Cerfon <philcerf@gmail.com>
To: ntfs3@lists.linux.dev
Subject: support for Cygwin XATTRs in NTFS3?
Date: Thu, 2 May 2024 20:42:13 +0200 [thread overview]
Message-ID: <CAN+za=NCAmgf9Lmc9qh6RC4TRMxHAimzm_qgXhF-tes0nChfyA@mail.gmail.com> (raw)
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
next reply other threads:[~2024-05-02 18:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 18:42 Philippe Cerfon [this message]
2024-05-02 19:38 ` support for Cygwin XATTRs in NTFS3? Philippe Cerfon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAN+za=NCAmgf9Lmc9qh6RC4TRMxHAimzm_qgXhF-tes0nChfyA@mail.gmail.com' \
--to=philcerf@gmail.com \
--cc=ntfs3@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).