diff options
author | Jeremy Allison <jra@samba.org> | 2012-10-02 10:15:54 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-11-01 09:10:37 +0100 |
commit | 84cee26dfac47f3a8cb47b6b58da9290d4fde41a (patch) | |
tree | bca37616a36c5513a8ae17825a3535933bd699c7 | |
parent | 12198746841f2ca5a6614148625957f27c79cb85 (diff) | |
download | samba-84cee26dfac47f3a8cb47b6b58da9290d4fde41a.tar.gz |
When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries.
Fix bug #9236 - ACL masks incorrectly applied when setting ACLs.
(cherry picked from commit 7dcb017fc1d8e8af5878b2b0139686829c0c1594)
-rw-r--r-- | source3/smbd/posix_acls.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index f7258bd66d7..646efa4b69c 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1386,6 +1386,16 @@ static bool ensure_canon_entry_valid(canon_ace **pp_ace, } got_other = True; 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); + } } } |