From b35add2e069fe07e29b8dbd41358b7d9284271b9 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 6 Dec 2012 10:38:11 +0100 Subject: [PATCH] Revert "Another fix needed for bug #9236 - ACL masks incorrectly applied when setting ACLs." This reverts commit ce8beb781f7456e53262bd331ab3fbb8a100356b. The patch will be picked again from master in the proper order to reduce the need for conflict resolution. Signed-off-by: Michael Adam --- source3/smbd/posix_acls.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 4e93fef5e36..02a680ee075 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1431,11 +1431,7 @@ static bool ensure_canon_entry_valid(connection_struct *conn, for (pace = *pp_ace; pace; pace = pace->next) { if (pace->type == SMB_ACL_USER_OBJ) { - if (setting_acl) { - /* - * Ensure we have default parameters for the - * user (owner) even on default ACLs. - */ + if (setting_acl && !is_default_acl) { apply_default_perms(params, is_directory, pace, S_IRUSR); } pace_user = pace; @@ -1518,11 +1514,9 @@ static bool ensure_canon_entry_valid(connection_struct *conn, pace->perms = pace_other->perms; } - /* - * Ensure we have default parameters for the - * user (owner) even on default ACLs. - */ - apply_default_perms(params, is_directory, pace, S_IRUSR); + if (!is_default_acl) { + apply_default_perms(params, is_directory, pace, S_IRUSR); + } } else { pace->perms = unix_perms_to_acl_perms(pst->st_ex_mode, S_IRUSR, S_IWUSR, S_IXUSR); } -- 2.11.4.GIT