s4:torture/smb2: make it possible to pass existing_conn to smb2_connect_ext()
authorStefan Metzmacher <metze@samba.org>
Mon, 7 Aug 2023 10:22:43 +0000 (12:22 +0200)
committerJule Anger <janger@samba.org>
Fri, 11 Aug 2023 08:48:12 +0000 (08:48 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15346

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 2b93058be3f6e5eaee239ad3b0e707c62089d18e)

source4/libcli/smb2/connect.c
source4/torture/smb2/util.c

index 1f68d90538b254a8e8ddef0c86ebe75ec5e3a060..64b678654468372895fb86567bafad4d35180bea 100644 (file)
@@ -405,6 +405,7 @@ NTSTATUS smb2_connect_ext(TALLOC_CTX *mem_ctx,
                          const char *share,
                          struct resolve_context *resolve_ctx,
                          struct cli_credentials *credentials,
+                         struct smbXcli_conn **existing_conn,
                          uint64_t previous_session_id,
                          struct smb2_tree **tree,
                          struct tevent_context *ev,
@@ -429,7 +430,7 @@ NTSTATUS smb2_connect_ext(TALLOC_CTX *mem_ctx,
                                   resolve_ctx,
                                   credentials,
                                   false, /* fallback_to_anonymous */
-                                  NULL, /* existing_conn */
+                                  existing_conn,
                                   previous_session_id,
                                   options,
                                   socket_options,
@@ -473,6 +474,7 @@ NTSTATUS smb2_connect(TALLOC_CTX *mem_ctx,
 
        status = smb2_connect_ext(mem_ctx, host, ports, share, resolve_ctx,
                                  credentials,
+                                 NULL, /* existing_conn */
                                  0, /* previous_session_id */
                                  tree, ev, options, socket_options,
                                  gensec_settings);
index ecf80d9105b14495fb2ab3cd948d86bbc8f57693..233f589c73f6f28f862bcfc490a44ae1e0138a50 100644 (file)
@@ -426,6 +426,7 @@ bool torture_smb2_connection_ext(struct torture_context *tctx,
                                  share,
                                  lpcfg_resolve_context(tctx->lp_ctx),
                                  samba_cmdline_get_creds(),
+                                 NULL, /* existing_conn */
                                  previous_session_id,
                                  tree,
                                  tctx->ev,