Skip to content

Commit f1b8224

Browse files
Eugene Korenevskysmfrench
authored andcommitted
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>
1 parent 16a57d7 commit f1b8224

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fs/smb/client/cached_dir.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,8 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
239239
.tcon = tcon,
240240
.path = path,
241241
.create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE),
242-
.desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES,
242+
.desired_access = FILE_READ_DATA | FILE_READ_ATTRIBUTES |
243+
FILE_READ_EA,
243244
.disposition = FILE_OPEN,
244245
.fid = pfid,
245246
.replay = !!(retries),

0 commit comments

Comments
 (0)