Second part of bugfix for 6865 - acl_xattr module: Has dependency that inherit acls...
authorJeremy Allison <jra@samba.org>
Thu, 12 Nov 2009 02:35:18 +0000 (18:35 -0800)
committerKarolin Seeger <kseeger@samba.org>
Thu, 26 Nov 2009 10:40:39 +0000 (11:40 +0100)
We also need dos filemode = true set as well.
Jeremy.
(cherry picked from commit a8769e667514f83a45ee3e825d21a351987d0210)
(cherry picked from commit fbb22af1fa4fceab143de77700d388eb073e7452)

docs-xml/smbdotconf/misc/dosfilemode.xml
source3/include/proto.h
source3/modules/vfs_acl_tdb.c
source3/modules/vfs_acl_xattr.c
source3/param/loadparm.c

index e67ccd935a58966940dcef9110beb3025d3282cc..cf531927337b3916d635f0b2f3ae14b43f1507ab 100644 (file)
        (including ACL) on it. Note that a user belonging to the group
        owning the file will not be allowed to change permissions if
        the group is only granted read access. Ownership of the
-       file/directory may also be changed.</para>
+       file/directory may also be changed.
+
+       Note that using the VFS modules acl_xattr or acl_tdb which store native
+       Windows as meta-data will automatically turn this option on for any
+       share for which they are loaded, as they require this option to emulate
+       Windows ACLs correctly.
+       </para>
 </description>
 <value type="default">no</value>
 </samba:parameter>
index 7213a0d8b3b2a7797ac5c0cbf6e8dedfbe80697e..27f80db44a91244c1a69ed9ff6a1f928caf7e1f0 100644 (file)
@@ -4373,7 +4373,6 @@ void lp_set_posix_default_cifsx_readwrite_locktype(enum brl_flavour val);
 int lp_min_receive_file_size(void);
 char* lp_perfcount_module(void);
 void lp_set_passdb_backend(const char *backend);
-bool set_inherit_acls(int i);
 
 /* The following definitions come from param/util.c  */
 
index 3d06e520e87a3bd64a2b0e9c3d9f347337266502..db3881e1e738029982bc6730120e0f84da2afd6b 100644 (file)
@@ -384,9 +384,11 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle,
 
        /* Ensure we have "inherit acls = yes" if we're
         * using this module. */
-       DEBUG(2,("connect_acl_tdb: setting 'inherit acls = true' for service %s\n",
+       DEBUG(2,("connect_acl_tdb: setting 'inherit acls = true' "
+               "and 'dos filemode = true' for service %s\n",
                service ));
-       set_inherit_acls(SNUM(handle->conn));
+       lp_do_parameter(SNUM(handle->conn), "inherit acls", "true");
+       lp_do_parameter(SNUM(handle->conn), "dos filemode", "true");
 
        return 0;
 }
index 11ca8902c09d1648637334e1e1bbab5704aa7e04..962d1b7b09dc954b10adaf1da3ce7dbbeca99596 100644 (file)
@@ -214,9 +214,13 @@ static int connect_acl_xattr(struct vfs_handle_struct *handle,
 {
        /* Ensure we have "inherit acls = yes" if we're
         * using this module. */
-       DEBUG(2,("connect_acl_xattr: setting 'inherit acls = true' for service %s\n",
+       DEBUG(2,("connect_acl_xattr: setting 'inherit acls = true' "
+               "and 'dos filemode = true' for service %s\n",
                service ));
-       set_inherit_acls(SNUM(handle->conn));
+
+        lp_do_parameter(SNUM(handle->conn), "inherit acls", "true");
+        lp_do_parameter(SNUM(handle->conn), "dos filemode", "true");
+
        return 0;
 }
 
index 9a0f834f99a6dffd0b806ecd68619ea74c25596d..c62deb5eda5948e59ef214293423968114ea2310 100644 (file)
@@ -9843,13 +9843,3 @@ void lp_set_passdb_backend(const char *backend)
 {
        string_set(&Globals.szPassdbBackend, backend);
 }
-
-bool set_inherit_acls(int i)
-{
-       if (!LP_SNUM_OK(i)) {
-               return false;
-       }
-       ServicePtrs[(i)]->bInheritACLS = true;
-
-       return true;
-}