[Linux-cifsd-devel] [PATCH] cifsd: make xattr format of ksmbd compatible with samba's one
linkinjeon at kernel.org
Sat Feb 13 14:56:37 UTC 2021
> Hi Namjae,
> I played with this today and found a few things.
Great. Thanks for your check!
>>>> 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
Okay, I will add xattr_DosInfo4 support. but I don't think that ksmbd
support the structure of too old samba version.
>>>> - 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.
ksmbd supports it under a different name. It would be better to change
it to the name used by samba.
>>>> - 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:
Hm... I'll try to reproduce it when I go to office.
> 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
More information about the samba-technical