vfs_streams_xattr: add options "prefix" and "store_stream_type"
commit634bcb09a08b927fd79ae0e16aeee2a123605f94
authorRalph Boehme <rb@sernet.de>
Tue, 20 May 2014 13:17:01 +0000 (20 15:17 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 13 Jun 2014 11:22:18 +0000 (13 13:22 +0200)
tree55104edb9c53a51e0a95613cb1950c1144e61fca
parentf03e8b12c6959fb8213fbfcd3792b70094bd9a71
vfs_streams_xattr: add options "prefix" and "store_stream_type"

Add module options that can be used to configure the stream prefix the
module uses (option "prefix", a string) and whether the stream type
"$DATA" is appended to the xattr name on disk (option
"store_stream_type", a boolean).

The default "prefix" is "user.DosStream" and the default for
"store_stream_type" is true, this gives unchanged default behaviour
when not specifying this option.

OS X SMB clients will send xattrs as named streams over the wire, by
setting the options to the following values

  streams_xattr:prefix = user.
  streams_xattr:store_stream_type = no

OS X xattrs will be stored on disk on the server with their unmodified
names and as such provide interoperability with other protocols like
AFP.

In order to prevent access to our internal Samba xattrs, check the
xattr name with the function samba_private_attr_name() made public by
the previous commit.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/modules/vfs_streams_xattr.c