1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

Second part of bugfix for 6865 - acl_xattr module: Has dependency that inherit acls = yes or xattrs are removed.

We also need dos filemode = true set as well.
Jeremy.
This commit is contained in:
Jeremy Allison 2009-11-11 18:35:18 -08:00
parent 8995d3d813
commit a8769e6675
5 changed files with 17 additions and 16 deletions

View File

@ -12,7 +12,13 @@
(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>

View File

@ -4374,7 +4374,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 */

View 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;
}

View 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;
}

View 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;
}