diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-04-23 08:12:34 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-04-23 08:12:34 +0000 |
commit | 2206df6b30c4992daa17257287390421cfc0662d (patch) | |
tree | e22b30e4aa5e028b6b1c7c5d5e7e53b77e3d25e3 /source3/libsmb | |
parent | a7d2c332fca9c85c21ff6dba424559c9323feacf (diff) | |
download | samba-2206df6b30c4992daa17257287390421cfc0662d.tar.gz samba-2206df6b30c4992daa17257287390421cfc0662d.tar.bz2 samba-2206df6b30c4992daa17257287390421cfc0662d.zip |
Merge torture tests from HEAD - it looks like we had rather an incomplete
merge last time. I hope this might fix a few failures on the build farm too.
Andrew Bartlett
(This used to be commit 0c837126923cc30fa60223a5a68d4f527971cc7b)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clifile.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 1163b752b1..b771e135f4 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -945,7 +945,6 @@ BOOL cli_setatr(struct cli_state *cli, const char *fname, uint16 attr, time_t t) /**************************************************************************** Check for existance of a dir. ****************************************************************************/ - BOOL cli_chkpath(struct cli_state *cli, const char *path) { pstring path2; @@ -1052,3 +1051,34 @@ int cli_ctemp(struct cli_state *cli, const char *path, char **tmp_path) return SVAL(cli->inbuf,smb_vwv0); } + + +/* + send a raw ioctl - used by the torture code +*/ +NTSTATUS cli_raw_ioctl(struct cli_state *cli, int fnum, uint32 code, DATA_BLOB *blob) +{ + memset(cli->outbuf,'\0',smb_size); + memset(cli->inbuf,'\0',smb_size); + + 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)); + + cli_send_smb(cli); + if (!cli_receive_smb(cli)) { + return NT_STATUS_UNEXPECTED_NETWORK_ERROR; + } + + if (cli_is_error(cli)) { + return cli_nt_error(cli); + } + + *blob = data_blob(NULL, 0); + + return NT_STATUS_OK; +} |