vfs_fruit: FreeBSD: attrname is wrong

classic Classic list List threaded Threaded
3 messages Options
HAT
Reply | Threaded
Open this post in threaded view
|

vfs_fruit: FreeBSD: attrname is wrong

HAT
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
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
HAT
Reply | Threaded
Open this post in threaded view
|

[PATCH] vfs_fruit: FreeBSD: attrname is wrong

HAT
--- ./source3/modules/vfs_fruit.c.orig 2015-10-20 19:40:54.000000000 +0900
+++ ./source3/modules/vfs_fruit.c 2016-01-09 21:43:54.113643998 +0900
@@ -104,13 +104,8 @@
  * REVIEW:
  * This is hokey, but what else can we do?
  */
-#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
 
 enum apple_fork {APPLE_FORK_DATA, APPLE_FORK_RSRC};
 

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
Reply | Threaded
Open this post in threaded view
|

Re: vfs_fruit: FreeBSD: attrname is wrong

Ralph Böhme-3
In reply to this post by HAT
On Sun, Jan 10, 2016 at 01:50:32AM +0900, HAT wrote:
> In case of FreeBSD, the name of the extended attribute is wrong.

just to let you know, this is still in my work queue.

-Ralph

--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@...

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba