diff options
author | Ralph Boehme <slow@samba.org> | 2017-02-27 16:14:39 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2017-03-03 21:55:27 +0100 |
commit | 8cbdc6a6dfe22a777e3420a6471726604fcafe60 (patch) | |
tree | c239e6981c55c780b8e2182fca39ec17033e33c3 /source4/param | |
parent | ac71bb3eb45fc87365206a5f6f9083c42972b25a (diff) | |
download | samba-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/param')
-rw-r--r-- | source4/param/loadparm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index f53b2dd1807..1044a07ee30 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -30,6 +30,7 @@ #include "lib/param/param.h" #include "libcli/raw/libcliraw.h" #include "librpc/ndr/libndr.h" +#include "libcli/smb/smb2_negotiate_context.h" void lpcfg_smbcli_options(struct loadparm_context *lp_ctx, struct smbcli_options *options) @@ -47,6 +48,7 @@ void lpcfg_smbcli_options(struct loadparm_context *lp_ctx, options->use_level2_oplocks = true; options->smb2_capabilities = SMB2_CAP_ALL; options->client_guid = GUID_random(); + options->max_credits = WINDOWS_CLIENT_PURE_SMB2_NEGPROT_INITIAL_CREDIT_ASK; } void lpcfg_smbcli_session_options(struct loadparm_context *lp_ctx, |