From 5e1962d7ca9f232345e6e7e64d358547958630ed Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 2 Oct 2012 10:15:54 -0700 Subject: [PATCH] When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries. (cherry picked from commit 6575d1d34fee45c7a965c7c9641cc52b566a9e7f) The last 4 patches address bug #9236 - ACL masks incorrectly applied when setting ACLs. (cherry picked from commit ac7d9768c718f6225f2182d763ec1dbc6dc48ea8) --- source3/smbd/posix_acls.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 09d6becf638..22ad40faec0 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1399,6 +1399,16 @@ static bool ensure_canon_entry_valid(connection_struct *conn, } 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); + } } } -- 2.11.4.GIT