[SCM] Samba Shared Repository - branch master updated

Andrew Bartlett abartlet at samba.org
Mon May 6 17:25:02 MDT 2013


The branch, master has been updated
       via  8ca4b75 Fix up the man pages to explain that "store dos attributes" overrides them.
       via  d25ba3f Allow "store dos attributes" to override the other "map XXX" parameters.
      from  9f36d0c build: default --with-regedit to "auto" instead of "yes"

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


- Log -----------------------------------------------------------------
commit 8ca4b7597d91355c4885b8ab89b0996c98f5c805
Author: Jeremy Allison <jra at samba.org>
Date:   Mon May 6 14:10:58 2013 -0700

    Fix up the man pages to explain that "store dos attributes" overrides them.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    
    Autobuild-User(master): Andrew Bartlett <abartlet at samba.org>
    Autobuild-Date(master): Tue May  7 01:24:54 CEST 2013 on sn-devel-104

commit d25ba3f5a6266c2787ab2cc6b17e0d3cde2e33a9
Author: Jeremy Allison <jra at samba.org>
Date:   Mon May 6 14:10:15 2013 -0700

    Allow "store dos attributes" to override the other "map XXX" parameters.
    
    Makes us consistent with what is described in the man pages.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>

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

Summary of changes:
 docs-xml/smbdotconf/filename/maparchive.xml        |    6 ++++++
 docs-xml/smbdotconf/filename/maphidden.xml         |    6 ++++++
 docs-xml/smbdotconf/filename/mapreadonly.xml       |    6 ++++++
 docs-xml/smbdotconf/filename/mapsystem.xml         |    6 ++++++
 .../smbdotconf/filename/storedosattributes.xml     |    4 ++--
 source3/smbd/dosmode.c                             |   13 ++++++++-----
 6 files changed, 34 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/filename/maparchive.xml b/docs-xml/smbdotconf/filename/maparchive.xml
index ead72cf..33ff876 100644
--- a/docs-xml/smbdotconf/filename/maparchive.xml
+++ b/docs-xml/smbdotconf/filename/maparchive.xml
@@ -13,6 +13,12 @@
 	</para>
 
 	<para>
+	Note that this parameter will be ignored if the <smbconfoption name="store dos attributes"/>
+	parameter is set, as the DOS archive attribute will then be stored inside a UNIX extended
+	attribute.
+	</para>
+
+	<para>
 	Note that this requires the <smbconfoption name="create mask"/>	parameter to be set such that owner 
 	execute bit is not masked out (i.e. it must include 100). See the parameter 
 	<smbconfoption name="create mask"/> for details.
diff --git a/docs-xml/smbdotconf/filename/maphidden.xml b/docs-xml/smbdotconf/filename/maphidden.xml
index 841c687..004f493 100644
--- a/docs-xml/smbdotconf/filename/maphidden.xml
+++ b/docs-xml/smbdotconf/filename/maphidden.xml
@@ -8,6 +8,12 @@
 	</para>
 
 	<para>
+	Note that this parameter will be ignored if the <smbconfoption name="store dos attributes"/>
+	parameter is set, as the DOS hidden attribute will then be stored inside a UNIX extended
+	attribute.
+	</para>
+
+	<para>
 	Note that this requires the <smbconfoption name="create mask"/> to be set such that the world execute 
 	bit is not masked out (i.e. it must include 001). See the parameter <smbconfoption name="create mask"/> 
 	for details.
diff --git a/docs-xml/smbdotconf/filename/mapreadonly.xml b/docs-xml/smbdotconf/filename/mapreadonly.xml
index 24a2c84..f4ac7c8 100644
--- a/docs-xml/smbdotconf/filename/mapreadonly.xml
+++ b/docs-xml/smbdotconf/filename/mapreadonly.xml
@@ -42,6 +42,12 @@
 		</para></listitem>
     </itemizedlist>
 
+        <para>
+        Note that this parameter will be ignored if the <smbconfoption name="store dos attributes"/>
+        parameter is set, as the DOS 'read-only' attribute will then be stored inside a UNIX extended
+        attribute.
+        </para>
+
 </description>
 <value type="default">yes</value>
 </samba:parameter>
diff --git a/docs-xml/smbdotconf/filename/mapsystem.xml b/docs-xml/smbdotconf/filename/mapsystem.xml
index 021602d..5605d88 100644
--- a/docs-xml/smbdotconf/filename/mapsystem.xml
+++ b/docs-xml/smbdotconf/filename/mapsystem.xml
@@ -7,6 +7,12 @@
 	This controls whether DOS style system files should be mapped to the UNIX group execute bit.
 	</para>
 
+        <para>
+        Note that this parameter will be ignored if the <smbconfoption name="store dos attributes"/>
+        parameter is set, as the DOS system attribute will then be stored inside a UNIX extended
+        attribute.
+        </para>
+
 	<para>
 	Note that this requires the <smbconfoption name="create mask"/>	to be set such that the group 
 	execute bit is not masked out (i.e. it must include 010). See the parameter 
diff --git a/docs-xml/smbdotconf/filename/storedosattributes.xml b/docs-xml/smbdotconf/filename/storedosattributes.xml
index 621b4ac..acd78b0 100644
--- a/docs-xml/smbdotconf/filename/storedosattributes.xml
+++ b/docs-xml/smbdotconf/filename/storedosattributes.xml
@@ -8,9 +8,9 @@
 	READ-ONLY) from a filesystem extended attribute, before mapping DOS attributes to UNIX permission bits (such
 	as occurs with <smbconfoption name="map hidden"/> and <smbconfoption name="map readonly"/>).  When set, DOS
 	attributes will be stored onto an extended attribute in the UNIX filesystem, associated with the file or
-	directory.  For no other mapping to occur as a fall-back, the parameters <smbconfoption name="map hidden"/>,
+	directory.  When this parameter is set it will override the parameters <smbconfoption name="map hidden"/>,
 	<smbconfoption name="map system"/>, <smbconfoption name="map archive"/> and <smbconfoption name="map
-	readonly"/> must be set to off.  This parameter writes the DOS attributes as a string into the extended
+	readonly"/> and they will behave as if they were set to off. This parameter writes the DOS attributes as a string into the extended
 	attribute named "user.DOSATTRIB". This extended attribute is explicitly hidden from smbd clients requesting an
 	EA list. On Linux the filesystem must have been mounted with the mount option user_xattr in order for
 	extended attributes to work, also extended attributes must be compiled into the Linux kernel.
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index b534626..04d27c7 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -354,10 +354,6 @@ static bool set_ea_dos_attribute(connection_struct *conn,
 	enum ndr_err_code ndr_err;
 	DATA_BLOB blob;
 
-	if (!lp_store_dos_attributes(SNUM(conn))) {
-		return False;
-	}
-
 	ZERO_STRUCT(dosattrib);
 	ZERO_STRUCT(blob);
 
@@ -773,7 +769,14 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
 	}
 #endif
 	/* Store the DOS attributes in an EA by preference. */
-	if (set_ea_dos_attribute(conn, smb_fname, dosmode)) {
+	if (lp_store_dos_attributes(SNUM(conn))) {
+		/*
+		 * Don't fall back to using UNIX modes. Finally
+		 * follow the smb.conf manpage.
+		 */
+		if (!set_ea_dos_attribute(conn, smb_fname, dosmode)) {
+			return -1;
+		}
 		if (!newfile) {
 			notify_fname(conn, NOTIFY_ACTION_MODIFIED,
 				     FILE_NOTIFY_CHANGE_ATTRIBUTES,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list