summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-30 02:17:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:05:03 -0500
commit39883a90cf3ecabfc39e68e8b1d3265a4026d25c (patch)
tree5e66f3abe634ce01fe8b19e99aa355155cad9927 /source4/torture/basic
parentad8c4ae941047aa7409ff0d8d10de721f5ff0659 (diff)
downloadsamba-39883a90cf3ecabfc39e68e8b1d3265a4026d25c.tar.gz
samba-39883a90cf3ecabfc39e68e8b1d3265a4026d25c.tar.bz2
samba-39883a90cf3ecabfc39e68e8b1d3265a4026d25c.zip
r3383: avoid multi-part SMBtrans and SMBtrans2 replies until our client library can handle
them properly (they are difficult to do in an async fashion). By choosing trans.in.max_data to fix in the negotiated buffer size a server won't send us multi-part replies. I notice that windows seems to avoid them too :) (This used to be commit e23edf762cace35f937959c9ffbef718431a79b9)
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/aliases.c10
-rw-r--r--source4/torture/basic/scanner.c8
2 files changed, 9 insertions, 9 deletions
diff --git a/source4/torture/basic/aliases.c b/source4/torture/basic/aliases.c
index 4f63b366a5..b63a1555f3 100644
--- a/source4/torture/basic/aliases.c
+++ b/source4/torture/basic/aliases.c
@@ -86,7 +86,7 @@ static void qfsinfo_aliases(struct smbcli_state *cli)
d_printf("\nChecking for QFSINFO aliases\n");
t2.in.max_param = 0;
- t2.in.max_data = 0x8000;
+ t2.in.max_data = smb_raw_max_trans_data(cli->tree, 0);
t2.in.max_setup = 0;
t2.in.flags = 0;
t2.in.timeout = 0;
@@ -109,7 +109,7 @@ static void qfileinfo_aliases(struct smbcli_state *cli)
d_printf("\nChecking for QFILEINFO aliases\n");
t2.in.max_param = 2;
- t2.in.max_data = 0x8000;
+ t2.in.max_data = smb_raw_max_trans_data(cli->tree, 2);
t2.in.max_setup = 0;
t2.in.flags = 0;
t2.in.timeout = 0;
@@ -149,7 +149,7 @@ static void qpathinfo_aliases(struct smbcli_state *cli)
d_printf("\nChecking for QPATHINFO aliases\n");
t2.in.max_param = 2;
- t2.in.max_data = 0x8000;
+ t2.in.max_data = smb_raw_max_trans_data(cli->tree, 2);
t2.in.max_setup = 0;
t2.in.flags = 0;
t2.in.timeout = 0;
@@ -193,7 +193,7 @@ static void findfirst_aliases(struct smbcli_state *cli)
d_printf("\nChecking for FINDFIRST aliases\n");
t2.in.max_param = 16;
- t2.in.max_data = 0x8000;
+ t2.in.max_data = smb_raw_max_trans_data(cli->tree, 16);
t2.in.max_setup = 0;
t2.in.flags = 0;
t2.in.timeout = 0;
@@ -345,7 +345,7 @@ static void setpathinfo_aliases(struct smbcli_state *cli)
d_printf("\nChecking for SETPATHINFO aliases\n");
t2.in.max_param = 32;
- t2.in.max_data = 0x8000;
+ t2.in.max_data = smb_raw_max_trans_data(cli->tree, 32);
t2.in.max_setup = 0;
t2.in.flags = 0;
t2.in.timeout = 0;
diff --git a/source4/torture/basic/scanner.c b/source4/torture/basic/scanner.c
index cd53cb3979..0e79e94f82 100644
--- a/source4/torture/basic/scanner.c
+++ b/source4/torture/basic/scanner.c
@@ -58,8 +58,8 @@ static NTSTATUS try_trans2(struct smbcli_state *cli,
mem_ctx = talloc_init("try_trans2");
- t2.in.max_param = 1024;
- t2.in.max_data = 0x8000;
+ t2.in.max_param = 64;
+ t2.in.max_data = smb_raw_max_trans_data(cli->tree, 64);
t2.in.max_setup = 10;
t2.in.flags = 0;
t2.in.timeout = 0;
@@ -339,8 +339,8 @@ static NTSTATUS try_nttrans(struct smbcli_state *cli,
ntdata_blob.length = data_len;
ntdata_blob.data = data;
- parms.in.max_param = 1024;
- parms.in.max_data = 1024;
+ parms.in.max_param = 64;
+ parms.in.max_data = smb_raw_max_trans_data(cli->tree, 64);
parms.in.max_setup = 0;
parms.in.setup_count = 0;
parms.in.function = op;