[SCM] Samba Shared Repository - branch master updated

Jeremy Allison jra at samba.org
Sat Dec 3 02:41:03 UTC 2016


The branch, master has been updated
       via  383530c libsocket: Make sure ifr.ifr_name is null-terminated
       via  20b7e08 manpages/vfs_fruit: add warning to fruit:resoure=stream
       via  ddd5a55 WHATSNEW: document fruit:resource option spelling issue
       via  7d4b4a4 vfs_fruit: fix fruit:resource option spelling
       via  682300c util: Initialize pointer
       via  5c79a0f logon script: clarify usage for different Samba roles
      from  bf520b7 s3:libsmb: restructure cli_full_connection_creds* flow

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 383530c164719b1ab41004f6dba2743ebba222ae
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 22 11:26:06 2016 +0200

    libsocket: Make sure ifr.ifr_name is null-terminated
    
    Found by Coverity
    
    Signed-off-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Sat Dec  3 03:40:53 CET 2016 on sn-devel-144

commit 20b7e08c07d940c246a706e624e14048cde81dd7
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Nov 10 09:07:41 2016 +0100

    manpages/vfs_fruit: add warning to fruit:resoure=stream
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12412
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit ddd5a55e713d966d33065f98450677020892cdb4
Author: Ralph Boehme <slow at samba.org>
Date:   Thu Nov 10 14:01:16 2016 +0100

    WHATSNEW: document fruit:resource option spelling issue
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 7d4b4a429955cf7fd43f3ac83990c5386ac8cd76
Author: Ralph Boehme <slow at samba.org>
Date:   Tue Nov 8 12:35:12 2016 +0100

    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.
    
    In Samba 4.6 we accept both the wrong and the correct spelling, in Samba
    4.7 the bad spelling will be removed.
    
    BUG: https://bugzilla.samba.org/show_bug.cgi?id=12412
    
    Signed-off-by: Ralph Boehme <slow at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

commit 682300ce0ae5861bb0caaa620c1a37654e997fb0
Author: Andreas Schneider <asn at samba.org>
Date:   Wed Jun 22 09:36:00 2016 +0200

    util: Initialize pointer
    
    Coverity warns about so this will silence it.
    Reviewed-by: Jeremy Allison <jra at samba.org>
    
    Signed-off-by: Andreas Schneider <asn at samba.org>

commit 5c79a0fc90fe4bbad7b0e83752b7d5ec1d65d8f6
Author: Alexander Bokovoy <ab at samba.org>
Date:   Thu Nov 10 11:07:42 2016 +0200

    logon script: clarify usage for different Samba roles
    
    'logon script' is only used when Samba runs as a logon server in the
    classical domain controller role. And even there 'ldapsam' passdb
    backend will override it.
    
    For Samba AD setup 'logon script' is not used at all.
    
    Signed-off-by: Alexander Bokovoy <ab at samba.org>
    Reviewed-by: Jeremy Allison <jra at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                              | 18 ++++++++++++++++++
 docs-xml/manpages/vfs_fruit.8.xml         | 17 +++++++++++++----
 docs-xml/smbdotconf/logon/logonscript.xml |  6 +++++-
 lib/socket/interfaces.c                   |  2 +-
 lib/util/debug.c                          |  2 +-
 selftest/target/Samba3.pm                 |  2 +-
 selftest/target/Samba4.pm                 |  2 +-
 source3/modules/vfs_fruit.c               | 31 ++++++++++++++++++++++++-------
 8 files changed, 64 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 6778a0a..39445cc 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -12,6 +12,23 @@ Samba 4.6 will be the next version of the Samba suite.
 UPGRADING
 =========
 
+vfs_fruit option "fruit:resource" spelling correction
+-----------------------------------------------------
+
+Due to a spelling error in the vfs_fruit option parsing for the "fruit:resource"
+option, users who have set this option in their smb.conf were still using the
+default setting "fruit:resource = file" as the parser was looking for the string
+"fruit:ressource" (two "s").
+
+After upgrading to this Samba version 4.6, you MUST either remove the option
+from your smb.conf or set it to the default "fruit:resource = file", otherwise
+your macOS clients will not be able to access the resource fork data.
+
+This version Samba 4.6 accepts both the correct and incorrect spelling, but the
+next Samba version 4.7 will not accept the wrong spelling.
+
+Users who were using the wrong spelling "ressource" with two "s" can keep the
+setting, but are advised to switch to the correct spelling.
 
 NEW FEATURES/CHANGES
 ====================
@@ -53,6 +70,7 @@ smb.conf changes
   --------------                -----------             -------
   kerberos encryption types     New                     all
   inherit owner                 New option
+  fruit:resource                Spelling correction
 
 
 KNOWN ISSUES
diff --git a/docs-xml/manpages/vfs_fruit.8.xml b/docs-xml/manpages/vfs_fruit.8.xml
index 7a84f87..fe0cd3c 100644
--- a/docs-xml/manpages/vfs_fruit.8.xml
+++ b/docs-xml/manpages/vfs_fruit.8.xml
@@ -86,7 +86,13 @@
 	  <varlistentry>
 	    <term>fruit:resource = [ file | xattr | stream ]</term>
 	    <listitem>
-	      <para>Controls where the OS X resource fork is stored:</para>
+	      <para>Controls where the OS X resource fork is stored.</para>
+
+	      <para>Due to a spelling bug in all Samba versions older then
+	      4.6.0, this option can also be given as
+	      <emphasis>fruit:ressource</emphasis>, ie with two s.</para>
+
+	      <para>Settings:</para>
 
 	      <itemizedlist>
 		<listitem><para><command>file (default)</command> - use a ._
@@ -99,9 +105,12 @@
 		down to Solaris and derived platforms and
 		ZFS</para></listitem>
 
-		<listitem><para><command>stream</command> - pass the
-		stream on to the next module in the VFS
-		stack</para></listitem>
+		<listitem><para><command>stream (experimental)</command> - pass
+		the stream on to the next module in the VFS stack.
+		<emphasis>Warning: </emphasis> this option should not be used
+		with the <emphasis>streams_xattr</emphasis> module due to the
+		extended attributes size limitations of most
+		filesytems.</para></listitem>
 	      </itemizedlist>
 
 	    </listitem>
diff --git a/docs-xml/smbdotconf/logon/logonscript.xml b/docs-xml/smbdotconf/logon/logonscript.xml
index 0a8d69d..3142a6c 100644
--- a/docs-xml/smbdotconf/logon/logonscript.xml
+++ b/docs-xml/smbdotconf/logon/logonscript.xml
@@ -43,7 +43,11 @@
 	</para>
 
 	<para>
-	This option is only useful if Samba is set up as a logon server.
+	This option is only useful if Samba is set up as a logon server in a classic domain controller role.
+       If Samba is set up as an Active Directory domain controller, LDAP attribute <filename moreinfo="none">scriptPath</filename>
+       is used instead. For configurations where <smbconfoption name="passdb backend">ldapsam</smbconfoption> is in use,
+       this option only defines a default value in case LDAP attribute <filename moreinfo="none">sambaLogonScript</filename>
+       is missing.
 	</para>
 </description>
 <value type="default"></value>
diff --git a/lib/socket/interfaces.c b/lib/socket/interfaces.c
index dacd118..6409275 100644
--- a/lib/socket/interfaces.c
+++ b/lib/socket/interfaces.c
@@ -146,7 +146,7 @@ static void query_iface_speed_from_name(const char *name, uint64_t *speed)
 	}
 
 	ZERO_STRUCT(ifr);
-	strncpy(ifr.ifr_name, name, IF_NAMESIZE);
+	strlcpy(ifr.ifr_name, name, IF_NAMESIZE);
 
 	ifr.ifr_data = (void *)&edata;
 	edata.cmd = ETHTOOL_GLINK;
diff --git a/lib/util/debug.c b/lib/util/debug.c
index 625d23a..99b1584 100644
--- a/lib/util/debug.c
+++ b/lib/util/debug.c
@@ -653,7 +653,7 @@ static bool debug_parse_param(char *param)
 {
 	char *class_name;
 	char *class_level;
-	char *saveptr;
+	char *saveptr = NULL;
 	int ndx;
 
 	class_name = strtok_r(param, ":", &saveptr);
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index f94494b..9013652 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1648,7 +1648,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 ec91f00..da60c44 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 6e7899aa..605b3e0 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;
@@ -1309,10 +1309,27 @@ static int init_fruit_config(vfs_handle_struct *handle)
 		return -1;
 	}
 
+	/*
+	 * Versions up to Samba 4.5.x had a spelling bug in the
+	 * fruit:resource option calling lp_parm_enum with
+	 * "res*s*ource" (ie two s).
+	 *
+	 * In Samba 4.6 we accept both the wrong and the correct
+	 * spelling, in Samba 4.7 the bad spelling will be removed.
+	 */
 	enumval = lp_parm_enum(SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME,
 			       "ressource", 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;
+	}
+	config->rsrc = (enum fruit_rsrc)enumval;
+
+	enumval = lp_parm_enum(SNUM(handle->conn), FRUIT_PARAM_TYPE_NAME,
+			       "resource", fruit_rsrc, enumval);
+	if (enumval == -1) {
+		DEBUG(1, ("value for %s: resource type unknown\n",
 			  FRUIT_PARAM_TYPE_NAME));
 		return -1;
 	}


-- 
Samba Shared Repository



More information about the samba-cvs mailing list