Commit f1b8224b authored by Eugene Korenevsky's avatar Eugene Korenevsky Committed by Steve French

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: default avatarEugene Korenevsky <ekorenevsky@astralinux.ru>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 16a57d76
...@@ -239,7 +239,8 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, ...@@ -239,7 +239,8 @@ int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon,
.tcon = tcon, .tcon = tcon,
.path = path, .path = path,
.create_options = cifs_create_options(cifs_sb, CREATE_NOT_FILE), .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, .disposition = FILE_OPEN,
.fid = pfid, .fid = pfid,
.replay = !!(retries), .replay = !!(retries),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment