struct tevent_context *ev,
struct smbd_smb2_request *smb2req,
uint32_t in_ctl_code,
- uint64_t in_file_id_persistent,
uint64_t in_file_id_volatile,
DATA_BLOB in_input,
uint32_t in_max_output,
in_input_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
in_input_buffer.length = in_input_length;
+ if (req->compat_chain_fsp) {
+ /* skip check */
+ } else if (in_file_id_persistent == UINT64_MAX &&
+ in_file_id_volatile == UINT64_MAX) {
+ /* without a handle */
+ } else if (in_file_id_persistent != in_file_id_volatile) {
+ return smbd_smb2_request_error(req, NT_STATUS_FILE_CLOSED);
+ }
+
subreq = smbd_smb2_ioctl_send(req,
req->sconn->ev_ctx,
req,
in_ctl_code,
- in_file_id_persistent,
in_file_id_volatile,
in_input_buffer,
in_max_output_length,
struct tevent_context *ev,
struct smbd_smb2_request *smb2req,
uint32_t in_ctl_code,
- uint64_t in_file_id_persistent,
uint64_t in_file_id_volatile,
DATA_BLOB in_input,
uint32_t in_max_output,
}
state->smbreq = smbreq;
- if (in_file_id_volatile != UINT64_MAX &&
- in_file_id_persistent != UINT64_MAX) {
+ if (in_file_id_volatile != UINT64_MAX) {
fsp = file_fsp(smbreq, (uint16_t)in_file_id_volatile);
if (fsp == NULL) {
tevent_req_nterror(req, NT_STATUS_FILE_CLOSED);
return tevent_req_post(req, ev);
}
- if (smb2req->compat_chain_fsp) {
- /* skip check */
- } else if (in_file_id_persistent != fsp->smbXsrv->global->open_persistent_id) {
- tevent_req_nterror(req, NT_STATUS_FILE_CLOSED);
- return tevent_req_post(req, ev);
- }
if (smbreq->conn != fsp->conn) {
tevent_req_nterror(req, NT_STATUS_FILE_CLOSED);
return tevent_req_post(req, ev);