diff options
author | Stefan Metzmacher <metze@samba.org> | 2020-07-01 18:37:44 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2020-07-08 15:54:38 +0000 |
commit | 3559a1df9bc80bf3b2a11faf020149dd9facfe4c (patch) | |
tree | d9a5149fc760bd11975cbc86a5221ee01bbf5f49 /source4 | |
parent | d2b8274438f8701ab79d773d72ac003a32bbfb51 (diff) | |
download | samba-3559a1df9bc80bf3b2a11faf020149dd9facfe4c.tar.gz |
s4:torture/smb2: make use of transport_options.only_negprot for multichannel connections
This avoid useless session setups and tree connects on the wire.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/torture/smb2/multichannel.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/source4/torture/smb2/multichannel.c b/source4/torture/smb2/multichannel.c index 714f150d51e..9cbfdf2c3f0 100644 --- a/source4/torture/smb2/multichannel.c +++ b/source4/torture/smb2/multichannel.c @@ -168,16 +168,21 @@ static struct smb2_tree *test_multichannel_create_channel( const char *host, const char *share, struct cli_credentials *credentials, - const struct smbcli_options *transport_options, + const struct smbcli_options *_transport_options, struct smb2_tree *parent_tree ) { + struct smbcli_options transport_options = *_transport_options; NTSTATUS status; struct smb2_transport *transport; struct smb2_session *session; bool ret = true; struct smb2_tree *tree; + if (parent_tree) { + transport_options.only_negprot = true; + } + status = smb2_connect(tctx, host, lpcfg_smb_ports(tctx->lp_ctx), @@ -186,7 +191,7 @@ static struct smb2_tree *test_multichannel_create_channel( credentials, &tree, tctx->ev, - transport_options, + &transport_options, lpcfg_socket_options(tctx->lp_ctx), lpcfg_gensec_settings(tctx, tctx->lp_ctx) ); @@ -1804,7 +1809,13 @@ static bool test_multichannel_num_channels(struct torture_context *tctx, transport2[i] = tree2[i]->session->transport; if (i == 0) { - /* done for the 1st channel */ + /* + * done for the 1st channel + * + * For all remaining channels we do the + * session setup on our own. + */ + transport2_options.only_negprot = true; continue; } |