summaryrefslogtreecommitdiff
path: root/fs/cifs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2022-01-03 17:50:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-23 14:03:14 +0300
commit68b8924f6038bff902fd5cc63de45f5b8a8ac228 (patch)
tree93e7a031c1410098a64cd5ecfb53b97dbcf96ba0 /fs/cifs
parentb4b8e7ae1346badd2836ab5323bc59f27f23ab24 (diff)
downloadlinux-68b8924f6038bff902fd5cc63de45f5b8a8ac228.tar.xz
cifs: fix set of group SID via NTSD xattrs
commit dd5a927e411836eaef44eb9b00fece615e82e242 upstream. 'setcifsacl -g <SID>' silently fails to set the group SID on server. Actually, the bug existed since commit 438471b67963 ("CIFS: Add support for setting owner info, dos attributes, and create time"), but this fix will not apply cleanly to kernel versions <= v5.10. Fixes: 3970acf7ddb9 ("SMB3: Add support for getting and setting SACLs") Cc: stable@vger.kernel.org # 5.11+ Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/xattr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/cifs/xattr.c b/fs/cifs/xattr.c
index 7d8b72d67c80..9d486fbbfbbd 100644
--- a/fs/cifs/xattr.c
+++ b/fs/cifs/xattr.c
@@ -175,11 +175,13 @@ static int cifs_xattr_set(const struct xattr_handler *handler,
switch (handler->flags) {
case XATTR_CIFS_NTSD_FULL:
aclflags = (CIFS_ACL_OWNER |
+ CIFS_ACL_GROUP |
CIFS_ACL_DACL |
CIFS_ACL_SACL);
break;
case XATTR_CIFS_NTSD:
aclflags = (CIFS_ACL_OWNER |
+ CIFS_ACL_GROUP |
CIFS_ACL_DACL);
break;
case XATTR_CIFS_ACL: