[PATCH RFC] s3: smbd: Consistently map EAs to user namespace
abartlet at samba.org
Tue Sep 27 21:37:41 UTC 2022
I honestly can't think of a way out of this that doesn't break
Mapping the EAs from multiple namespaces by stripping the prefix really
seems to be a bad idea - if only because information is lost.
Also, I just don't see what business a windows client would have in
reading the non-user EAs, and if a client should read them they should
be read in their own namespace.
On Tue, 2022-09-27 at 22:10 +0200, Daniel Kobras via samba-technical
> Hi all!
> The attached patch restricts the extended attributes that Samba
> to clients as Windows EAs to the 'user' namespace in the local
> filesystem. This is a potentially user-visible change, and Jeremy
> suggested I put this up here for comments and discussion first.
> Gory details can be found in a recent thread on the samba list,
> the related bug report, quick summary here:
> Samba maps all Windows EA to EA names below the 'user' namespace in
> local filesystem, but in the opposite direction, it exposes all EA
> namespaces (except 'system' and some EAs reserved for internal use)
> Windows EAs. The 'user.' prefix is stripped, all other names are
> verbatim. For EAs outside the 'user' namespace, this leads to
> collisions ('foo.bar' and 'user.foo.bar' map to the same Windows EA),
> and renames those EAs if a file is copied via Samba ('foo.bar' on the
> original file becomes 'user.foo.bar' in the clone). The latter may
> to subtle and misleading errors if the 'user' EA namespace is
> (mount option 'user_xattr' not set).
> The issues can be avoided with a consistent mapping between Windows
> and the 'user' namespace in both directions, ie. no longer present
> outside of 'user' as Windows EAs in SMB_INFO_QUERY_ALL_EAS and
> Do you agree with this approach? Are there applications that rely on
> the current mapping of non-user EAs? Please let me know if I should
> submit the patch as a proper MR.
> Kind regards,
> Daniel Kobras
> Principal Architect
> Puzzle ITC Deutschland
> +49 7071 14316 0
Andrew Bartlett (he/him) https://samba.org/~abartlet/
Samba Team Member (since 2001) https://samba.org
Samba Team Lead, Catalyst IT https://catalyst.net.nz/services/samba
Samba Development and Support, Catalyst IT - Expert Open Source
More information about the samba-technical