Sorry that was the wrong "Fixes" - it was "Retain old ACEs when converting..." I added a Fixes tag On Fri, Mar 26, 2021 at 10:54 AM Steve French <smfrench@xxxxxxxxx> wrote: > > Presumably: > > commit 5171317dfd9afcf729799d31fffdbb9e71e45402 > Author: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> > Date: Wed Mar 10 10:22:27 2021 +0000 > > cifs: update new ACE pointer after populate_new_aces. > > On Fri, Mar 26, 2021 at 10:51 AM Aurélien Aptel <aaptel@xxxxxxxx> wrote: > > > > Shyam Prasad N <nspmangalore@xxxxxxxxx> writes: > > > Found a regression in modefromsid with my last fix in cifsacl. > > > Tested against mode check tests for both cifsacl and modefromsid this time. > > > > Can you put a Fixes tag? > > > > Cheers, > > -- > > Aurélien Aptel / SUSE Labs Samba Team > > GPG: 1839 CB5F 9F5B FB9B AA97 8C99 03C8 A49B 521B D5D3 > > SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE > > GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München) > > > > > -- > Thanks, > > Steve -- Thanks, Steve
From 455637dd2e976ec8a8fff12f56a4b92115296696 Mon Sep 17 00:00:00 2001 From: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> Date: Fri, 26 Mar 2021 10:28:16 +0000 Subject: [PATCH] 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: f5065508897a ("cifs: Retain old ACEs when converting between mode bits and ACL") Signed-off-by: Shyam Prasad N <sprasad@xxxxxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> --- fs/cifs/cifsacl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index 2be22a5c690f..d178cf85e926 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c @@ -1130,8 +1130,7 @@ static int set_chmod_dacl(struct cifs_acl *pdacl, struct cifs_acl *pndacl, } /* If it's any one of the ACE we're replacing, skip! */ - if (!mode_from_sid && - ((compare_sids(&pntace->sid, &sid_unix_NFS_mode) == 0) || + if (((compare_sids(&pntace->sid, &sid_unix_NFS_mode) == 0) || (compare_sids(&pntace->sid, pownersid) == 0) || (compare_sids(&pntace->sid, pgrpsid) == 0) || (compare_sids(&pntace->sid, &sid_everyone) == 0) || -- 2.27.0