1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-09 08:58:35 +03:00

smb2_ioctl: only pass through to VFS on a valid fsp

A null fsp is dereferenced on VFS call.

Reviewed by: Jeremy Allison <jra@samba.org>
This commit is contained in:
David Disseldorp 2013-01-15 17:23:08 +01:00 committed by Jeremy Allison
parent bfe765367e
commit c3cc51e8a2

View File

@ -505,6 +505,9 @@ struct tevent_req *smb2_ioctl_network_fs(uint32_t ctl_code,
uint8_t *out_data = NULL;
uint32_t out_data_len = 0;
if (state->fsp == NULL) {
status = NT_STATUS_NOT_SUPPORTED;
} else {
status = SMB_VFS_FSCTL(state->fsp,
state,
ctl_code,
@ -519,6 +522,7 @@ struct tevent_req *smb2_ioctl_network_fs(uint32_t ctl_code,
tevent_req_done(req);
return tevent_req_post(req, ev);
}
}
if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) {
if (IS_IPC(state->smbreq->conn)) {