summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-10-08 18:06:58 -0700
committerJeremy Allison <jra@samba.org>2008-10-08 18:06:58 -0700
commit543c6a02ae1dcb903de800c88af1f9e221827d61 (patch)
tree32ae5ccf825b1f67f7d22e1ec4e4d9efc00e48ee /source3/smbd/open.c
parent88a58ae0eeb553969c903a94e578375e109ad05a (diff)
downloadsamba-543c6a02ae1dcb903de800c88af1f9e221827d61.tar.gz
samba-543c6a02ae1dcb903de800c88af1f9e221827d61.tar.bz2
samba-543c6a02ae1dcb903de800c88af1f9e221827d61.zip
For the vfs_acl_xattr.c module, make sure we map GENERIC file and directory bits
to specific bits every time a security descriptor is set. The S4 torture suite proves that generic bits are not returned when querying an ACL set using them (ie. only the specific bits are stored on disk). Jeremy.
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r--source3/smbd/open.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index ad024a58ef..8727e80d5f 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2764,6 +2764,10 @@ NTSTATUS create_file_unixpath(connection_struct *conn,
fsp->access_mask = FILE_GENERIC_ALL;
+ /* Convert all the generic bits. */
+ security_acl_map_generic(sd->dacl, &file_generic_mapping);
+ security_acl_map_generic(sd->sacl, &file_generic_mapping);
+
status = SMB_VFS_FSET_NT_ACL(fsp, sec_info_sent, sd);
fsp->access_mask = saved_access_mask;