vfs_fruit option fruit:resource

Ralph Böhme slow at samba.org
Tue Nov 8 11:43:38 UTC 2016


On Tue, Nov 08, 2016 at 04:07:07PM +0530, Shilpa K wrote:
> Filed bug https://bugzilla.samba.org/show_bug.cgi?id=12412

thanks! Patch attached.

Someone please review & push if ok. Thanks!

Cheerio!
-slow
-------------- next part --------------
From 2ce786f8509f18ef4dd90849dc0c8a83d6019340 Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Tue, 8 Nov 2016 12:35:12 +0100
Subject: [PATCH] vfs_fruit: fix fruit:resource option spelling

Fix all occurences of bad spelling of "resource" as "res*s*ource" (two
s).

One of the places where this was wrong was when parsing parametric
options in the VFS connect() function in the module. As a result any
setting of

  fruit:resource=something

in smb.conf was silently ignored and the default ("file") was active.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12412

Signed-off-by: Ralph Boehme <slow at samba.org>
---
 selftest/target/Samba3.pm   |  2 +-
 selftest/target/Samba4.pm   |  2 +-
 source3/modules/vfs_fruit.c | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 3746d53..d0b8dfd 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1647,7 +1647,7 @@ sub provision($$$$$$$$)
 	path = $shrdir
 	vfs objects = catia fruit streams_xattr acl_xattr
 	ea support = yes
-	fruit:ressource = file
+	fruit:resource = file
 	fruit:metadata = netatalk
 	fruit:locking = netatalk
 	fruit:encoding = native
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 40cca94..7a816f0 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -937,7 +937,7 @@ sub provision($$$$$$$$$$)
 	path = $ctx->{share}
 	vfs objects = catia fruit streams_xattr acl_xattr
 	ea support = yes
-	fruit:ressource = file
+	fruit:resource = file
 	fruit:metadata = netatalk
 	fruit:locking = netatalk
 	fruit:encoding = native
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
index 2984dea..5e2cd67 100644
--- a/source3/modules/vfs_fruit.c
+++ b/source3/modules/vfs_fruit.c
@@ -68,7 +68,7 @@
  *
  * The AFP_Resource stream is stored in an AppleDouble file prepending
  * "._" to the filename. On Solaris with ZFS the stream is optionally
- * stored in an EA "org.netatalk.ressource".
+ * stored in an EA "org.netatalk.resource".
  *
  *
  * Extended Attributes
@@ -378,7 +378,7 @@ struct ad_entry_order entry_order_meta_xattr[ADEID_NUM_XATTR + 1] = {
 	{0, 0, 0}
 };
 
-/* AppleDouble ressource fork file (the ones prefixed by "._") */
+/* AppleDouble resource fork file (the ones prefixed by "._") */
 static const
 struct ad_entry_order entry_order_dot_und[ADEID_NUM_DOT_UND + 1] = {
 	{ADEID_FINDERI,    ADEDOFF_FINDERI_DOT_UND,  ADEDLEN_FINDERI},
@@ -387,8 +387,8 @@ struct ad_entry_order entry_order_dot_und[ADEID_NUM_DOT_UND + 1] = {
 };
 
 /*
- * Fake AppleDouble entry oder for ressource fork xattr.  The xattr
- * isn't an AppleDouble file, it simply contains the ressource data,
+ * Fake AppleDouble entry oder for resource fork xattr.  The xattr
+ * isn't an AppleDouble file, it simply contains the resource data,
  * but in order to be able to use some API calls like ad_getentryoff()
  * we build a fake/helper struct adouble with this entry order struct.
  */
@@ -926,7 +926,7 @@ static ssize_t ad_header_read_rsrc(struct adouble *ad, const char *path)
 		/* Now parse entries */
 		ok = ad_unpack(ad, ADEID_NUM_DOT_UND, sbuf.st_ex_size);
 		if (!ok) {
-			DEBUG(1, ("invalid AppleDouble ressource %s\n", path));
+			DEBUG(1, ("invalid AppleDouble resource %s\n", path));
 			errno = EINVAL;
 			rc = -1;
 			goto exit;
@@ -938,7 +938,7 @@ static ssize_t ad_header_read_rsrc(struct adouble *ad, const char *path)
 			< ADEDLEN_FINDERI)
 		    || (ad_getentryoff(ad, ADEID_RFORK)
 			< ADEDOFF_RFORK_DOT_UND)) {
-			DEBUG(2, ("invalid AppleDouble ressource %s\n", path));
+			DEBUG(2, ("invalid AppleDouble resource %s\n", path));
 			errno = EINVAL;
 			rc = -1;
 			goto exit;
@@ -1310,9 +1310,9 @@ static int init_fruit_config(vfs_handle_struct *handle)
 	}
 
 	enumval = lp_parm_enum(SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME,
-			       "ressource", fruit_rsrc, FRUIT_RSRC_ADFILE);
+			       "resource", fruit_rsrc, FRUIT_RSRC_ADFILE);
 	if (enumval == -1) {
-		DEBUG(1, ("value for %s: ressource type unknown\n",
+		DEBUG(1, ("value for %s: resource type unknown\n",
 			  FRUIT_PARAM_TYPE_NAME));
 		return -1;
 	}
-- 
2.7.4



More information about the samba-technical mailing list