cifs: Fix getting DACL-only xattr system.cifs_acl and system.smb3_acl
authorPali Rohár <pali@kernel.org>
Mon, 14 Oct 2024 11:47:04 +0000 (13:47 +0200)
committerSteve French <stfrench@microsoft.com>
Wed, 26 Mar 2025 19:50:40 +0000 (14:50 -0500)
commitad9364a6835c45c52f47587ffbe0577bb7cd4c5b
tree2c8a6431d3325f2461675e25a9e820e87338160a
parent6c06be908ca190e2d8feae1cf452d78598cd0b94
cifs: Fix getting DACL-only xattr system.cifs_acl and system.smb3_acl

Currently ->get_acl() callback always create request for OWNER, GROUP and
DACL, even when only DACLs was requested by user. Change API callback to
request only information for which the caller asked. Therefore when only
DACLs requested, then SMB client will prepare and send DACL-only request.

This change fixes retrieving of "system.cifs_acl" and "system.smb3_acl"
xattrs to contain only DACL structure as documented.

Note that setting/changing of "system.cifs_acl" and "system.smb3_acl"
xattrs already takes only DACL structure and ignores all other fields.

Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/cifsacl.c
fs/smb/client/cifssmb.c
fs/smb/client/smb2pdu.c
fs/smb/client/xattr.c