diff options
-rw-r--r-- | source3/libsmb/clifile.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index fb4857a1a5..6c4ae1ad49 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -4153,28 +4153,20 @@ NTSTATUS cli_ctemp(struct cli_state *cli, */ NTSTATUS cli_raw_ioctl(struct cli_state *cli, uint16_t fnum, uint32_t code, DATA_BLOB *blob) { - memset(cli->outbuf,'\0',smb_size); - memset(cli->inbuf,'\0',smb_size); - - cli_set_message(cli->outbuf, 3, 0, True); - SCVAL(cli->outbuf,smb_com,SMBioctl); - cli_setup_packet(cli); - - SSVAL(cli->outbuf, smb_vwv0, fnum); - SSVAL(cli->outbuf, smb_vwv1, code>>16); - SSVAL(cli->outbuf, smb_vwv2, (code&0xFFFF)); + uint16_t vwv[3]; + NTSTATUS status; + struct tevent_req *result_parent; - cli_send_smb(cli); - if (!cli_receive_smb(cli)) { - return NT_STATUS_UNEXPECTED_NETWORK_ERROR; - } + SSVAL(vwv+0, 0, fnum); + SSVAL(vwv+1, 0, code>>16); + SSVAL(vwv+2, 0, (code&0xFFFF)); - if (cli_is_error(cli)) { - return cli_nt_error(cli); + status = cli_smb(talloc_tos(), cli, SMBioctl, 0, 3, vwv, 0, NULL, + &result_parent, 0, NULL, NULL, NULL, NULL); + if (!NT_STATUS_IS_OK(status)) { + return status; } - *blob = data_blob_null; - return NT_STATUS_OK; } |