vfs_streams_xattr: stream name prefix and type suffix
abartlet at samba.org
Fri Jun 13 22:34:03 MDT 2014
On Wed, 2014-05-21 at 13:47 +0200, Ralph Böhme wrote:
> Hi all!
> I'm trying to figure out a proper solution such that xattrs sent by an
> OS X SMB client as named streams are stored on disk on the server by
> vfs_streams_xattr in a way that's compatible with the way other
> protocols use xattr names.
> Using vfs_streams_xattr for named streams support in Samba results in
> all (this is simplified) streams stored on disk with a name
> "user.DosStream.NAME:$DATA" where NAME is the name of the stream.
> As the OS X SMB client sends xattrs as named streams across the wire,
> an xattr that is created by the client with a name "foo" is stored on
> the server as "user.DosStream.foo:$DATA".
> Accessing the same filesystem with other protocols, eg AFP, would
> expect "user.foo" as xattr name.
> It would be nice to make the module behaviour configurable:
> 1) a string option for the prefix (with the previous value as default:
> 2) a boolean that controls whether the stream type ("$DATA") name is
> appended to the xattr name (with a default of true which resembles
> previous behaviour)
> Attached patches implement this. The initial patch makes a private
> function public. I'm then calling that function from the VFS module
> for checking againt the private Samba xattr namespace.
> With the patches applied, adding the following to smb.conf
> streams_xattr:prefix = user.
> streams_xattr:store_stream_type = no
> gives the desired behaviour.
I realise this is already in master, but my main thought is that
interopability should be the default, not something users have to turn
I realise that we have existing installations, backwards compatability
etc, but too much of Samba 'working right' has become 'only if you run
with the magic options', and users are left to find those options.
Could we reasonably move to using this for new attributes by default?
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
Samba Developer, Catalyst IT http://catalyst.net.nz/services/samba
More information about the samba-technical