cifs: open_cached_dir(): add FILE_READ_EA to desired access

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>
This commit is contained in:
Eugene Korenevsky 2024-03-01 17:53:44 +03:00 committed by Steve French
parent 16a57d7681
commit f1b8224b4e
1 changed files with 2 additions and 1 deletions

View File

@ -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),