cifs: Add support for FSCTL passthrough that write data to the server
Add support to pass a blob to the server in FSCTL passthrough. Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com> Signed-off-by: Steve French <stfrench@microsoft.com>
这个提交包含在:
@@ -1382,6 +1382,18 @@ smb2_ioctl_query_info(const unsigned int xid,
|
||||
oparms.fid = &fid;
|
||||
oparms.reconnect = false;
|
||||
|
||||
/*
|
||||
* FSCTL codes encode the special access they need in the fsctl code.
|
||||
*/
|
||||
if (qi.flags & PASSTHRU_FSCTL) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
rc = SMB2_open_init(tcon, &rqst[0], &oplock, &oparms, path);
|
||||
if (rc)
|
||||
goto iqinf_exit;
|
||||
@@ -1399,8 +1411,9 @@ smb2_ioctl_query_info(const unsigned int xid,
|
||||
|
||||
rc = SMB2_ioctl_init(tcon, &rqst[1],
|
||||
COMPOUND_FID, COMPOUND_FID,
|
||||
qi.info_type, true, NULL,
|
||||
0, CIFSMaxBufSize);
|
||||
qi.info_type, true, buffer,
|
||||
qi.output_buffer_length,
|
||||
CIFSMaxBufSize);
|
||||
}
|
||||
} else if (qi.flags == PASSTHRU_QUERY_INFO) {
|
||||
memset(&qi_iov, 0, sizeof(qi_iov));
|
||||
|
在新工单中引用
屏蔽一个用户