From 2206df6b30c4992daa17257287390421cfc0662d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 23 Apr 2003 08:12:34 +0000 Subject: 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) --- source3/libsmb/clifile.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'source3/libsmb/clifile.c') 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; +} -- cgit