X-Git-Url: http://git.samba.org/?p=samba.git;a=blobdiff_plain;f=source4%2Ftorture%2Fbasic%2Fscanner.c;h=144b7d0e036998f27a1e26ca86ad40c6f2eeb5d4;hp=68fccc501002e154cf3ba46744720314ea53686d;hb=5482e5426e09667d26e04dd0c6e0107e46e1028f;hpb=7c1fdfe4b5f7dbe215a04f2c5ecb82a410ac10f8 diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c index 68fccc50100..144b7d0e036 100644 --- a/source4/torture/basic/scanner.c +++ b/source4/torture/basic/scanner.c @@ -18,12 +18,12 @@ */ #include "includes.h" -#include "torture/torture.h" #include "libcli/libcli.h" #include "torture/util.h" -#include "libcli/raw/libcliraw.h" +#include "libcli/raw/raw_proto.h" #include "system/filesys.h" #include "param/param.h" +#include "torture/basic/proto.h" #define VERBOSE 0 #define OP_MIN 0 @@ -49,7 +49,7 @@ static void trans2_check_hit(const char *format, int op, int level, NTSTATUS sta } /**************************************************************************** -check for existance of a trans2 call +check for existence of a trans2 call ****************************************************************************/ static NTSTATUS try_trans2(struct smbcli_state *cli, int op, @@ -64,8 +64,8 @@ static NTSTATUS try_trans2(struct smbcli_state *cli, mem_ctx = talloc_init("try_trans2"); - t2.in.max_param = 64; - t2.in.max_data = smb_raw_max_trans_data(cli->tree, 64); + t2.in.max_param = UINT16_MAX; + t2.in.max_data = UINT16_MAX; t2.in.max_setup = 10; t2.in.flags = 0; t2.in.timeout = 0; @@ -160,9 +160,10 @@ static bool trans2_op_exists(struct smbcli_state *cli, int op) } /**************************************************************************** -check for existance of a trans2 call +check for existence of a trans2 call ****************************************************************************/ -static bool scan_trans2(struct smbcli_state *cli, int op, int level, +static bool scan_trans2( + struct smbcli_state *cli, int op, int level, int fnum, int dnum, int qfnum, const char *fname) { int data_len = 0; @@ -231,7 +232,7 @@ static bool scan_trans2(struct smbcli_state *cli, int op, int level, SSVAL(param, 0, level); SSVAL(param, 2, 0); SSVAL(param, 4, 0); - param_len += push_string(lp_iconv_convenience(global_loadparm), + param_len += push_string( ¶m[6], fname, PARAM_SIZE-7, STR_TERMINATE|STR_UNICODE); @@ -247,7 +248,7 @@ static bool scan_trans2(struct smbcli_state *cli, int op, int level, SSVAL(param, 0, level); SSVAL(param, 2, 0); SSVAL(param, 4, 0); - param_len += push_string(lp_iconv_convenience(global_loadparm), + param_len += push_string( ¶m[6], "\\newfile.dat", PARAM_SIZE-7, STR_TERMINATE|STR_UNICODE); @@ -264,7 +265,7 @@ static bool scan_trans2(struct smbcli_state *cli, int op, int level, smbcli_mkdir(cli->tree, "\\testdir"); param_len = 2; SSVAL(param, 0, level); - param_len += push_string(lp_iconv_convenience(global_loadparm), + param_len += push_string( ¶m[2], "\\testdir", PARAM_SIZE-3, STR_TERMINATE|STR_UNICODE); @@ -376,8 +377,8 @@ static NTSTATUS try_nttrans(struct smbcli_state *cli, ntdata_blob.length = data_len; ntdata_blob.data = data; - parms.in.max_param = 64; - parms.in.max_data = smb_raw_max_trans_data(cli->tree, 64); + parms.in.max_param = UINT32_MAX; + parms.in.max_data = UINT32_MAX; parms.in.max_setup = 0; parms.in.setup_count = 0; parms.in.function = op; @@ -433,7 +434,7 @@ static NTSTATUS try_nttrans_len(struct smbcli_state *cli, } /**************************************************************************** -check for existance of a nttrans call +check for existence of a nttrans call ****************************************************************************/ static bool scan_nttrans(struct smbcli_state *cli, int op, int level, int fnum, int dnum, const char *fname) @@ -491,7 +492,7 @@ static bool scan_nttrans(struct smbcli_state *cli, int op, int level, SSVAL(param, 0, level); SSVAL(param, 2, 0); SSVAL(param, 4, 0); - param_len += push_string(lp_iconv_convenience(global_loadparm), + param_len += push_string( ¶m[6], fname, PARAM_SIZE, STR_TERMINATE | STR_UNICODE); @@ -507,7 +508,7 @@ static bool scan_nttrans(struct smbcli_state *cli, int op, int level, SSVAL(param, 0, level); SSVAL(param, 2, 0); SSVAL(param, 4, 0); - param_len += push_string(lp_iconv_convenience(global_loadparm), + param_len += push_string( ¶m[6], "\\newfile.dat", PARAM_SIZE, STR_TERMINATE | STR_UNICODE); @@ -524,8 +525,7 @@ static bool scan_nttrans(struct smbcli_state *cli, int op, int level, smbcli_mkdir(cli->tree, "\\testdir"); param_len = 2; SSVAL(param, 0, level); - param_len += push_string(lp_iconv_convenience(global_loadparm), - ¶m[2], "\\testdir", PARAM_SIZE, + param_len += push_string(¶m[2], "\\testdir", PARAM_SIZE, STR_TERMINATE | STR_UNICODE); status = try_nttrans_len(cli, "dfs", op, level, param, data, param_len,