[SMB3] smb3: fix access denied on change notify request to some servers
diff mbox series

Message ID CAH2r5mvgtg0QdikUa78ZwCRG7Lx1-v=XKhnVWGVqqi=JMzKA4A@mail.gmail.com
State New
Headers show
Series
  • [SMB3] smb3: fix access denied on change notify request to some servers
Related show

Commit Message

Steve French July 7, 2020, 11:13 p.m. UTC
read permission, not just read attributes permission, is required
on the directory.

See MS-SMB2 (protocol specification) section 3.3.5.19.

Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org> # v5.6+
---
 fs/cifs/smb2ops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Pavel Shilovsky July 7, 2020, 11:18 p.m. UTC | #1
Looks good!

Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>

--
Best regards,
Pavel Shilovsky

вт, 7 июл. 2020 г. в 16:13, Steve French <smfrench@gmail.com>:
>
> read permission, not just read attributes permission, is required
> on the directory.
>
> See MS-SMB2 (protocol specification) section 3.3.5.19.
>
> Signed-off-by: Steve French <stfrench@microsoft.com>
> CC: Stable <stable@vger.kernel.org> # v5.6+
> ---
>  fs/cifs/smb2ops.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
> index d9fdafa5eb60..32f90dc82c84 100644
> --- a/fs/cifs/smb2ops.c
> +++ b/fs/cifs/smb2ops.c
> @@ -2148,7 +2148,7 @@ smb3_notify(const unsigned int xid, struct file *pfile,
>
>   tcon = cifs_sb_master_tcon(cifs_sb);
>   oparms.tcon = tcon;
> - oparms.desired_access = FILE_READ_ATTRIBUTES;
> + oparms.desired_access = FILE_READ_ATTRIBUTES | FILE_READ_DATA;
>   oparms.disposition = FILE_OPEN;
>   oparms.create_options = cifs_create_options(cifs_sb, 0);
>   oparms.fid = &fid;
> --
> 2.25.1
>
>
> --
> Thanks,
>
> Steve

Patch
diff mbox series

diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index d9fdafa5eb60..32f90dc82c84 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -2148,7 +2148,7 @@  smb3_notify(const unsigned int xid, struct file *pfile,

  tcon = cifs_sb_master_tcon(cifs_sb);
  oparms.tcon = tcon;
- oparms.desired_access = FILE_READ_ATTRIBUTES;
+ oparms.desired_access = FILE_READ_ATTRIBUTES | FILE_READ_DATA;
  oparms.disposition = FILE_OPEN;
  oparms.create_options = cifs_create_options(cifs_sb, 0);
  oparms.fid = &fid;