[Samba] vfs_fruit: FreeBSD: attrname is wrong
HAT
hat at fa2.so-net.ne.jp
Sat Jan 9 16:50:32 UTC 2016
In case of FreeBSD, the name of the extended attribute is wrong.
% lsextattr user ICONandEA.txt
ICONandEA.txt netatalk.Metadata com.apple.TextEncoding com.apple.metadata:kMDItemFinderComment
"netatalk.Metadata" is incompatible to Netatalk.
The first atom "org." is removed.
source3/include/smb.h:
/* Prefix for DosStreams in the vfs_streams_xattr module */
#define SAMBA_XATTR_DOSSTREAM_PREFIX “user.DosStream.”
There is always "user.".
vfs_streams_xattr seems to eliminate the first atom, in case of FreeBSD or Solaris.
source3/modules/vfs_fruit.c:
#if defined(HAVE_ATTROPEN) || defined(FREEBSD)
#define AFPINFO_EA_NETATALK “org.netatalk.Metadata”
#define AFPRESOURCE_EA_NETATALK “org.netatalk.ResourceFork”
#else
#define AFPINFO_EA_NETATALK “user.org.netatalk.Metadata”
#define AFPRESOURCE_EA_NETATALK “user.org.netatalk.ResourceFork”
#endif
vfs_fruit should always put "user.".
A attached patch fixes this problem.
% lsextattr user ICONandEA.txt
ICONandEA.txt com.apple.metadata:kMDItemFinderComment org.netatalk.Metadata com.apple.TextEncoding
Enveronment:
FreeBSD 10.2
samba43-4.3.3
afp.conf:
[global]
workgroup = LOCALNET
server string = %h
dos charset = CP932
security = user
passdb backend = smbpasswd
load printers = no
[Test 1]
path = /export/test1/
writable = yes
vfs objects = catia fruit streams_xattr
fruit:locking = netatalk
fruit:encoding = native
streams_xattr:prefix = user.
streams_xattr:store_stream_type = no
ea support = yes
--
HAT
More information about the samba
mailing list