diff options
author | Volker Lendecke <vl@samba.org> | 2010-02-07 13:36:49 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2010-02-20 18:59:29 +0100 |
commit | b69a74eeca6acbfb1be0ef3eb8f84e2f4700f2a9 (patch) | |
tree | 022c6e9ed98a8b832e0b45b89eaea91508f023fd /source3/libsmb | |
parent | 89e6a5263e29759c4edd1a8e856443f59dff0c31 (diff) | |
download | samba-b69a74eeca6acbfb1be0ef3eb8f84e2f4700f2a9.tar.gz samba-b69a74eeca6acbfb1be0ef3eb8f84e2f4700f2a9.tar.bz2 samba-b69a74eeca6acbfb1be0ef3eb8f84e2f4700f2a9.zip |
s3: Convert cli_raw_ioctl to use cli_smb()
Diffstat (limited to 'source3/libsmb')
-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; } |