summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Korenevsky <ekorenevsky@astralinux.ru>2024-03-01 17:53:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-03 16:32:23 +0300
commitb62024d8605f90b0f261787b169e9a7ff193f9ab (patch)
tree5d8fd5009311a5d55005d2e5514933ef0ccda71d
parent1efeb115dfef62fabdb191ca5a7d4e9e08b7110f (diff)
downloadlinux-b62024d8605f90b0f261787b169e9a7ff193f9ab.tar.xz
cifs: open_cached_dir(): add FILE_READ_EA to desired access
[ Upstream commit f1b8224b4e6ed59e7e6f5c548673c67410098d8d ] Since smb2_query_eas() reads EA and uses cached directory, open_cached_dir() should request FILE_READ_EA access. Otherwise listxattr() and getxattr() will fail with EACCES (0xc0000022 STATUS_ACCESS_DENIED SMB status). Link: https://bugzilla.kernel.org/show_bug.cgi?id=218543 Cc: stable@vger.kernel.org Signed-off-by: Eugene Korenevsky <ekorenevsky@astralinux.ru> Signed-off-by: Steve French <stfrench@microsoft.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--fs/smb/client/cached_dir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/smb/client/cached_dir.c b/fs/smb/client/cached_dir.c
index 3de5047a7ff9..a0017724d523 100644
--- a/fs/smb/client/cached_dir.c
+++ b/fs/smb/client/cached_dir.c
@@ -239,7 +239,8 @@ replay_again:
.tcon = tcon,
.path = path,
.create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE),
- .desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES,
+ .desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES |
+ FILE_READ_EA,
.disposition = FILE_OPEN,
.fid = pfid,
.replay = !!(retries),