diff options
author | Steve French <stfrench@microsoft.com> | 2019-04-11 20:53:17 +0200 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2019-05-08 06:24:55 +0200 |
commit | 46e6661963fb5d55952b550f0716bda22e10f1ae (patch) | |
tree | 10053084f0892547aed2b2881f3bf96052f42033 /fs | |
parent | cifs: Add support for FSCTL passthrough that write data to the server (diff) | |
download | linux-46e6661963fb5d55952b550f0716bda22e10f1ae.tar.xz linux-46e6661963fb5d55952b550f0716bda22e10f1ae.zip |
SMB3: Add handling for different FSCTL access flags
DesiredAccess field in SMB3 open request needs
to be set differently for READ vs. WRITE ioctls
(not just ones that request both).
Originally noticed by Pavel
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/smb2ops.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index ed8c2ba9590b..08ff044fbb4b 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -1389,7 +1389,15 @@ smb2_ioctl_query_info(const unsigned int xid, switch (qi.info_type & FSCTL_DEVICE_ACCESS_MASK) { case FSCTL_DEVICE_ACCESS_FILE_READ_WRITE_ACCESS: oparms.desired_access = FILE_READ_DATA | FILE_WRITE_DATA | FILE_READ_ATTRIBUTES | SYNCHRONIZE; - ; + break; + case FSCTL_DEVICE_ACCESS_FILE_ANY_ACCESS: + oparms.desired_access = GENERIC_ALL; + break; + case FSCTL_DEVICE_ACCESS_FILE_READ_ACCESS: + oparms.desired_access = GENERIC_READ; + break; + case FSCTL_DEVICE_ACCESS_FILE_WRITE_ACCESS: + oparms.desired_access = GENERIC_WRITE; break; } } |