summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-08-13 09:54:42 +0200
committerKarolin Seeger <kseeger@samba.org>2013-08-30 11:53:23 +0200
commit0a880e0433867e7fb66422213a18c6d0f7cae60c (patch)
tree761ec5d4a7499d1f9f2937a47d3b69df3c2a3348 /libcli
parentd0fbe4f2fc4c1d22d5378117a6b266bc4cb846d5 (diff)
downloadsamba-0a880e0433867e7fb66422213a18c6d0f7cae60c.tar.gz
libcli/smb: pass max_dyn_len to smb2cli_req_create()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 4a3352020db962ef40728d8a754da8a9418ca8a7)
Diffstat (limited to 'libcli')
-rw-r--r--libcli/smb/smbXcli_base.c11
-rw-r--r--libcli/smb/smbXcli_base.h3
2 files changed, 10 insertions, 4 deletions
diff --git a/libcli/smb/smbXcli_base.c b/libcli/smb/smbXcli_base.c
index ef9d82a001a..60c1c9f8e38 100644
--- a/libcli/smb/smbXcli_base.c
+++ b/libcli/smb/smbXcli_base.c
@@ -2494,7 +2494,7 @@ static bool smb2cli_req_cancel(struct tevent_req *req)
0, /* timeout */
tcon, session,
fixed, fixed_len,
- NULL, 0);
+ NULL, 0, 0);
if (subreq == NULL) {
return false;
}
@@ -2543,7 +2543,8 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
const uint8_t *fixed,
uint16_t fixed_len,
const uint8_t *dyn,
- uint32_t dyn_len)
+ uint32_t dyn_len,
+ uint32_t max_dyn_len)
{
struct tevent_req *req;
struct smbXcli_req_state *state;
@@ -2616,6 +2617,7 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
state->smb2.fixed_len = fixed_len;
state->smb2.dyn = dyn;
state->smb2.dyn_len = dyn_len;
+ state->smb2.max_dyn_len = max_dyn_len;
if (state->smb2.should_encrypt) {
SIVAL(state->smb2.transform, SMB2_TF_PROTOCOL_ID, SMB2_TF_MAGIC);
@@ -2985,12 +2987,15 @@ struct tevent_req *smb2cli_req_send(TALLOC_CTX *mem_ctx,
{
struct tevent_req *req;
NTSTATUS status;
+ uint32_t max_dyn_len = 0;
req = smb2cli_req_create(mem_ctx, ev, conn, cmd,
additional_flags, clear_flags,
timeout_msec,
tcon, session,
- fixed, fixed_len, dyn, dyn_len);
+ fixed, fixed_len,
+ dyn, dyn_len,
+ max_dyn_len);
if (req == NULL) {
return NULL;
}
diff --git a/libcli/smb/smbXcli_base.h b/libcli/smb/smbXcli_base.h
index a497e1376f9..017c0f059d5 100644
--- a/libcli/smb/smbXcli_base.h
+++ b/libcli/smb/smbXcli_base.h
@@ -218,7 +218,8 @@ struct tevent_req *smb2cli_req_create(TALLOC_CTX *mem_ctx,
const uint8_t *fixed,
uint16_t fixed_len,
const uint8_t *dyn,
- uint32_t dyn_len);
+ uint32_t dyn_len,
+ uint32_t max_dyn_len);
void smb2cli_req_set_notify_async(struct tevent_req *req);
NTSTATUS smb2cli_req_compound_submit(struct tevent_req **reqs,
int num_reqs);