[Linux-cifsd-devel] [PATCH] cifsd: make xattr format of ksmbd compatible with samba's one
metze at samba.org
Fri Feb 12 13:53:33 UTC 2021
I played with this today and found a few things.
>>> Samba team request that ksmbd should make xattr format of ksmbd
>>> with samba's one. When user replace samba with ksmbd or replace ksmbd
>>> with samba, The written attribute and ACLs of xattr in file should be
>>> on both server. This patch work the following ones.
>>> 1. make xattr prefix compaible.
>>> - rename creation.time and file.attribute to DOSATTRIB.
I just noticed that you use xattr_DosInfo3 instead of xattr_DosInfo4,
Samba uses xattr_DosInfo4, starting from samba-4.11.0, so all supported
Samba releases write xattr_DosInfo4. All versions from 3.5-4.10 wrote
xattr_DosInfo3. Versions before 3.5 only stored the hex-string.
So it would be good to read hex-string-only, xattr_DosInfo3 and xattr_DosInfo4 and write
>>> - rename stream. to DosStream.
I noticed that "vfs objects = acl_xattr" is allowed,
"vfs objects = streams_xattr acl_xattr" is not handled at all,
even acl_xattr isn't detected in that case.
>>> - rename sd. to NTACL.
There seems to be a problem, when a new file inherits acls from the parent
directory. There I see a strange owner sid:
owner_sid : *
owner_sid : S-21-2276714256
WARNING! 20 unread bytes
 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
 00 00 00 00
I used this command to analyze this:
getfattr -n security.NTACL WHATSNEW.txt | grep security.NTACL| sed -e 's!security.NTACL=0s!!' | ndrdump --base64-input xattr xattr_NTACL struct 2>&1 |less
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the samba-technical