summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-10-02 10:15:54 -0700
committerJeremy Allison <jra@samba.org>2012-10-02 11:41:35 -0700
commit6575d1d34fee45c7a965c7c9641cc52b566a9e7f (patch)
tree9189649e5b6aaccb8347c683db3572b2eb33de92
parent5d5ddbd62490d3e87dd990554a2c7b7eaf2cc24e (diff)
downloadsamba-6575d1d34fee45c7a965c7c9641cc52b566a9e7f.tar.gz
samba-6575d1d34fee45c7a965c7c9641cc52b566a9e7f.tar.bz2
samba-6575d1d34fee45c7a965c7c9641cc52b566a9e7f.zip
When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries.
-rw-r--r--source3/smbd/posix_acls.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 125234cdfa..b00f1ec1bc 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -1395,6 +1395,16 @@ static bool ensure_canon_entry_valid(connection_struct *conn,
apply_default_perms(params, is_directory, pace, S_IROTH);
}
pace_other = pace;
+
+ } else if (pace->type == SMB_ACL_USER || pace->type == SMB_ACL_GROUP) {
+
+ /*
+ * Ensure create mask/force create mode is respected on set.
+ */
+
+ if (setting_acl && !is_default_acl) {
+ apply_default_perms(params, is_directory, pace, S_IRGRP);
+ }
}
}