Skip to content

Commit 3bffbe9

Browse files
sprasad-microsoftsmfrench
authored andcommitted
cifs: Fix chmod with modefromsid when an older ACE already exists.
My recent fixes to cifsacl to maintain inherited ACEs had regressed modefromsid when an older ACL already exists. Found testing xfstest 495 with modefromsid mount option Fixes: f506550 ("cifs: Retain old ACEs when converting between mode bits and ACL") Signed-off-by: Shyam Prasad N <[email protected]> Reviewed-by: Paulo Alcantara (SUSE) <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 45a4546 commit 3bffbe9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/cifs/cifsacl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,8 +1130,7 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl,
11301130
}
11311131

11321132
/* If it's any one of the ACE we're replacing, skip! */
1133-
if (!mode_from_sid &&
1134-
((compare_sids(&pntace->sid, &sid_unix_NFS_mode) == 0) ||
1133+
if (((compare_sids(&pntace->sid, &sid_unix_NFS_mode) == 0) ||
11351134
(compare_sids(&pntace->sid, pownersid) == 0) ||
11361135
(compare_sids(&pntace->sid, pgrpsid) == 0) ||
11371136
(compare_sids(&pntace->sid, &sid_everyone) == 0) ||

0 commit comments

Comments
 (0)