summaryrefslogtreecommitdiff
path: root/source4/libcli/raw
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2017-02-27 16:14:39 +0100
committerJeremy Allison <jra@samba.org>2017-03-03 21:55:27 +0100
commit8cbdc6a6dfe22a777e3420a6471726604fcafe60 (patch)
treec239e6981c55c780b8e2182fca39ec17033e33c3 /source4/libcli/raw
parentac71bb3eb45fc87365206a5f6f9083c42972b25a (diff)
downloadsamba-8cbdc6a6dfe22a777e3420a6471726604fcafe60.tar.gz
libcli/smb: add max_credits arg to smbXcli_negprot_send()
This allows source4/torture code to set the option for tests by preparing a struct smbcli_options with max_credits set to some value and pass that to a torture_smb2_connection_ext(). This will be used in subsequent smbtorture test for SMB2 creditting. Behaviour of existing upper layers is unchanged, they simply pass the wanted max credits value to smbXcli_negprot_send() instead of retrofitting it with a call to smb2cli_conn_set_max_credits(). Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/libcli/raw')
-rw-r--r--source4/libcli/raw/libcliraw.h1
-rw-r--r--source4/libcli/raw/rawnegotiate.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/source4/libcli/raw/libcliraw.h b/source4/libcli/raw/libcliraw.h
index 8220cd7c563..96dfcd4c765 100644
--- a/source4/libcli/raw/libcliraw.h
+++ b/source4/libcli/raw/libcliraw.h
@@ -103,6 +103,7 @@ struct smbcli_options {
enum smb_signing_setting signing;
uint32_t smb2_capabilities;
struct GUID client_guid;
+ uint64_t max_credits;
};
/* this is the context for the client transport layer */
diff --git a/source4/libcli/raw/rawnegotiate.c b/source4/libcli/raw/rawnegotiate.c
index 4b42c2662a0..f6a189ff8d7 100644
--- a/source4/libcli/raw/rawnegotiate.c
+++ b/source4/libcli/raw/rawnegotiate.c
@@ -60,7 +60,8 @@ struct tevent_req *smb_raw_negotiate_send(TALLOC_CTX *mem_ctx,
transport->conn,
timeout_msec,
minprotocol,
- maxprotocol);
+ maxprotocol,
+ transport->options.max_credits);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}