summaryrefslogtreecommitdiff
path: root/source4/torture/smb2/multichannel.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/smb2/multichannel.c')
-rw-r--r--source4/torture/smb2/multichannel.c17
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;
}