* [PATCH] cifsd: fix a precedence bug in parse_dacl()
@ 2021-03-18 13:10 Dan Carpenter
2021-03-19 4:44 ` Sergey Senozhatsky
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-03-18 13:10 UTC (permalink / raw)
To: Namjae Jeon
Cc: Hyunchul Lee, Sergey Senozhatsky, Steve French, Ronnie Sahlberg,
linux-kernel, linux-cifs, kernel-janitors
The shift has higher precedence than mask so this doesn't work as
intended.
Fixes: ef24dca82789 ("cifsd: add support for ACLs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
fs/cifsd/smbacl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/cifsd/smbacl.c b/fs/cifsd/smbacl.c
index 8d8360ca4751..294c5a8fe9af 100644
--- a/fs/cifsd/smbacl.c
+++ b/fs/cifsd/smbacl.c
@@ -520,7 +520,7 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
fattr->cf_gid;
acl_state.groups->aces[acl_state.groups->n++].perms.allow =
(mode & 0070) >> 3;
- default_acl_state.group.allow = mode & 0070 >> 3;
+ default_acl_state.group.allow = (mode & 0070) >> 3;
default_acl_state.groups->aces[default_acl_state.groups->n].gid =
fattr->cf_gid;
default_acl_state.groups->aces[default_acl_state.groups->n++].perms.allow =
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-03-19 4:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-18 13:10 [PATCH] cifsd: fix a precedence bug in parse_dacl() Dan Carpenter
2021-03-19 4:44 ` Sergey Senozhatsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox