[SCM] Samba Shared Repository - branch master updated
Stefan Metzmacher
metze at samba.org
Tue Aug 9 10:15:04 MDT 2011
The branch, master has been updated
via 81e7655 s3:libsmb/cli*: use CLI_BUFFER_SIZE instead of cli->max_xmit
via 70c2bbe s3:torture/*: use CLI_BUFFER_SIZE instead of cli->max_xmit
from 46eacae script/librelease.sh: add git push for the release tag
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 81e765582bb231a3e182c96777a0eef045095c9a
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Aug 2 23:05:31 2011 +0200
s3:libsmb/cli*: use CLI_BUFFER_SIZE instead of cli->max_xmit
The max_data parameter of trans2/nttrans calls are not bound
to cli->max_xmit. Even with cli->max_xmit, which means the max
size of the whole SMB pdu, we would get fragmented trans2/nttrans
replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE.
metze
Autobuild-User: Stefan Metzmacher <metze at samba.org>
Autobuild-Date: Tue Aug 9 18:14:38 CEST 2011 on sn-devel-104
commit 70c2bbecde434264e0b54279f13159e9991efade
Author: Stefan Metzmacher <metze at samba.org>
Date: Tue Aug 2 22:59:54 2011 +0200
s3:torture/*: use CLI_BUFFER_SIZE instead of cli->max_xmit
The max_data parameter of trans2/nttrans calls are not bound
to cli->max_xmit. Even with cli->max_xmit, which means the max
size of the whole SMB pdu, we would get fragmented trans2/nttrans
replies. That's why we can also use our maximum, which is CLI_BUFFER_SIZE.
metze
-----------------------------------------------------------------------
Summary of changes:
source3/libsmb/clidfs.c | 2 +-
source3/libsmb/clifile.c | 8 ++++----
source3/libsmb/clilist.c | 4 ++--
source3/libsmb/clirap.c | 14 +++++++-------
source3/torture/nbench.c | 2 +-
source3/torture/scanner.c | 4 ++--
6 files changed, 17 insertions(+), 17 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c
index a445649..a40ef89 100644
--- a/source3/libsmb/clidfs.c
+++ b/source3/libsmb/clidfs.c
@@ -654,7 +654,7 @@ NTSTATUS cli_dfs_get_referral(TALLOC_CTX *ctx,
NULL, 0xffff, 0, 0,
setup, 1, 0,
param, param_len, 2,
- NULL, 0, cli->max_xmit,
+ NULL, 0, CLI_BUFFER_SIZE,
&recv_flags2,
NULL, 0, NULL, /* rsetup */
NULL, 0, NULL,
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index f9e3cbd..2a30d2c 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -612,7 +612,7 @@ struct tevent_req *cli_posix_getfacl_send(TALLOC_CTX *mem_ctx,
return NULL;
}
subreq = cli_qpathinfo_send(state, ev, cli, fname, SMB_QUERY_POSIX_ACL,
- 0, cli->max_xmit);
+ 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -4142,7 +4142,7 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, uint16_t setup_val,
status = cli_trans(talloc_tos(), cli, SMBtrans2, NULL, -1, 0, 0,
setup, 1, 0,
param, param_len, 2,
- data, data_len, cli->max_xmit,
+ data, data_len, CLI_BUFFER_SIZE,
NULL,
NULL, 0, NULL, /* rsetup */
NULL, 0, NULL, /* rparam */
@@ -4327,7 +4327,7 @@ struct tevent_req *cli_get_ea_list_path_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_INFO_QUERY_ALL_EAS, 4,
- cli->max_xmit);
+ CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -5376,7 +5376,7 @@ struct tevent_req *cli_shadow_copy_data_send(TALLOC_CTX *mem_ctx,
return NULL;
}
state->get_names = get_names;
- ret_size = get_names ? cli->max_xmit : 16;
+ ret_size = get_names ? CLI_BUFFER_SIZE : 16;
SIVAL(state->setup + 0, 0, FSCTL_GET_SHADOW_COPY_DATA);
SSVAL(state->setup + 2, 0, fnum);
diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index ba3dd2b..ac10795 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -599,7 +599,7 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx,
SMBtrans2, NULL, -1, 0, 0,
state->setup, 1, 0,
state->param, param_len, 10,
- NULL, 0, cli->max_xmit);
+ NULL, 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -783,7 +783,7 @@ static void cli_list_trans_done(struct tevent_req *subreq)
SMBtrans2, NULL, -1, 0, 0,
state->setup, 1, 0,
state->param, param_len, 10,
- NULL, 0, state->cli->max_xmit);
+ NULL, 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return;
}
diff --git a/source3/libsmb/clirap.c b/source3/libsmb/clirap.c
index b6cbec4..8e7dc68 100644
--- a/source3/libsmb/clirap.c
+++ b/source3/libsmb/clirap.c
@@ -590,7 +590,7 @@ struct tevent_req *cli_qpathinfo1_send(TALLOC_CTX *mem_ctx,
}
state->cli = cli;
subreq = cli_qpathinfo_send(state, ev, cli, fname, SMB_INFO_STANDARD,
- 22, cli->max_xmit);
+ 22, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -766,7 +766,7 @@ struct tevent_req *cli_qpathinfo2_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_QUERY_FILE_ALL_INFO,
- 68, cli->max_xmit);
+ 68, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -901,7 +901,7 @@ struct tevent_req *cli_qpathinfo_streams_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_FILE_STREAM_INFORMATION,
- 0, cli->max_xmit);
+ 0, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -1079,7 +1079,7 @@ NTSTATUS cli_qfilename(struct cli_state *cli, uint16_t fnum,
status = cli_qfileinfo(talloc_tos(), cli, fnum,
SMB_QUERY_FILE_NAME_INFO,
- 4, cli->max_xmit, &recv_flags2,
+ 4, CLI_BUFFER_SIZE, &recv_flags2,
&rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -1133,7 +1133,7 @@ NTSTATUS cli_qfileinfo_basic(struct cli_state *cli, uint16_t fnum,
status = cli_qfileinfo(talloc_tos(), cli, fnum,
SMB_QUERY_FILE_ALL_INFO,
- 68, MIN(cli->max_xmit, 0xffff),
+ 68, CLI_BUFFER_SIZE,
NULL,
&rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
@@ -1192,7 +1192,7 @@ struct tevent_req *cli_qpathinfo_basic_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, cli, fname,
SMB_QUERY_FILE_BASIC_INFO,
- 36, cli->max_xmit);
+ 36, CLI_BUFFER_SIZE);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
@@ -1283,7 +1283,7 @@ NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstrin
status = cli_qpathinfo(talloc_tos(), cli, fname,
SMB_QUERY_FILE_ALT_NAME_INFO,
- 4, cli->max_xmit, &rdata, &num_rdata);
+ 4, CLI_BUFFER_SIZE, &rdata, &num_rdata);
if (!NT_STATUS_IS_OK(status)) {
return status;
}
diff --git a/source3/torture/nbench.c b/source3/torture/nbench.c
index d2fddf0..612dc7d 100644
--- a/source3/torture/nbench.c
+++ b/source3/torture/nbench.c
@@ -298,7 +298,7 @@ static struct tevent_req *nbench_cmd_send(TALLOC_CTX *mem_ctx,
}
subreq = cli_qpathinfo_send(state, ev, nb_state->cli, fname,
ival(state->cmd->params[2]),
- 0, nb_state->cli->max_xmit);
+ 0, CLI_BUFFER_SIZE);
break;
}
default:
diff --git a/source3/torture/scanner.c b/source3/torture/scanner.c
index 5edd52d..580dadf 100644
--- a/source3/torture/scanner.c
+++ b/source3/torture/scanner.c
@@ -67,7 +67,7 @@ static NTSTATUS try_trans2(struct cli_state *cli,
op, 0,
NULL, 0, 0, /* setup */
param, param_len, 2,
- data, data_len, cli->max_xmit,
+ data, data_len, CLI_BUFFER_SIZE,
NULL, /* recv_flags2 */
NULL, 0, NULL, /* rsetup */
&rparam, 0, rparam_len,
@@ -313,7 +313,7 @@ static NTSTATUS try_nttrans(struct cli_state *cli,
op, 0,
NULL, 0, 0, /* setup */
param, param_len, 2,
- data, data_len, cli->max_xmit,
+ data, data_len, CLI_BUFFER_SIZE,
NULL, /* recv_flags2 */
NULL, 0, NULL, /* rsetup */
&rparam, 0, rparam_len,
--
Samba Shared Repository
More information about the samba-cvs
mailing list