]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:libcli: pass struct loadparm_context to smb_composite_connect_send()
authorStefan Metzmacher <metze@samba.org>
Thu, 10 Apr 2025 14:48:48 +0000 (16:48 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2025 10:17:30 +0000 (10:17 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source4/libcli/smb_composite/connect.c
source4/libcli/smb_composite/fetchfile.c
source4/libcli/smb_composite/fsinfo.c
source4/libcli/smb_composite/smb_composite.h
source4/librpc/rpc/dcerpc_connect.c
source4/ntvfs/cifs/vfs_cifs.c
source4/torture/basic/misc.c
source4/torture/raw/lockbench.c
source4/torture/raw/openbench.c

index e8456efe9cde7e3e60dbbe91ff1783f1e4d33e75..92bd99f419fa3e3d0d6aa89d507623de55c4177a 100644 (file)
@@ -413,6 +413,7 @@ static void subreq_handler(struct tevent_req *subreq)
 */
 struct composite_context *smb_composite_connect_send(struct smb_composite_connect *io,
                                                     TALLOC_CTX *mem_ctx,
+                                                    struct loadparm_context *lp_ctx,
                                                     struct resolve_context *resolve_ctx,
                                                     struct tevent_context *event_ctx)
 {
@@ -521,7 +522,7 @@ NTSTATUS smb_composite_connect(struct smb_composite_connect *io, TALLOC_CTX *mem
                               struct resolve_context *resolve_ctx,
                               struct tevent_context *ev)
 {
-       struct composite_context *c = smb_composite_connect_send(io, mem_ctx, resolve_ctx, ev);
+       struct composite_context *c = smb_composite_connect_send(io, mem_ctx, lp_ctx, resolve_ctx, ev);
        if (c == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
index 52cdf756d56ada9d94bd591c126fa0b0cff4c5b1..b82bc072d650195bb54128105e05c28c3aef6c5b 100644 (file)
@@ -153,7 +153,7 @@ struct composite_context *smb_composite_fetchfile_send(struct smb_composite_fetc
        state->connect->in.options      = io->in.options;
        state->connect->in.session_options = io->in.session_options;
 
-       state->creq = smb_composite_connect_send(state->connect, state, 
+       state->creq = smb_composite_connect_send(state->connect, state, lp_ctx,
                                                 io->in.resolve_ctx, event_ctx);
        if (state->creq == NULL) goto failed;
 
index 480492c51320c743b8c0fff82bb44f4652b2c4d1..017658d9947273b740fd3f3fa7b4e01235aa5e52 100644 (file)
@@ -167,7 +167,7 @@ struct composite_context *smb_composite_fsinfo_send(struct smbcli_tree *tree,
        c->private_data = state;
 
        state->creq = smb_composite_connect_send(state->connect, state,
-                        resolve_ctx, c->event_ctx);
+                        lp_ctx, resolve_ctx, c->event_ctx);
 
        if (state->creq == NULL) goto failed;
   
index 1b5e398ebf8b181555caead98eda9b99b85347aa..002d6cb7e30abc3c1abafa8f10f69ac1c4c7f104 100644 (file)
@@ -153,6 +153,7 @@ struct smb_composite_connect {
 
 struct composite_context *smb_composite_connect_send(struct smb_composite_connect *io,
                                                     TALLOC_CTX *mem_ctx,
+                                                    struct loadparm_context *lp_ctx,
                                                     struct resolve_context *resolve_ctx,
                                                     struct tevent_context *event_ctx);
 NTSTATUS smb_composite_connect_recv(struct composite_context *c, TALLOC_CTX *mem_ctx);
index 901bed5633caf4154c52d7ae520c4bc2bd993d06..b0acd9450eddd6c1f7c9277021c832b3d5a106de 100644 (file)
@@ -298,6 +298,7 @@ static void continue_smbXcli_connect(struct tevent_req *subreq)
         * on the established connection.
         */
        creq = smb_composite_connect_send(conn, s->io.conn,
+                                         s->lp_ctx,
                                          s->io.resolve_ctx,
                                          c->event_ctx);
        if (composite_nomem(creq, c)) return;
index a749ee5fc306c1d5aaf671cf6b30096328355325..a43f91070bdaa255a93f8a2916f1c5ae63320936 100644 (file)
@@ -304,6 +304,7 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
        }
 
        creq = smb_composite_connect_send(&io, p,
+                                         ntvfs->ctx->lp_ctx,
                                          lpcfg_resolve_context(ntvfs->ctx->lp_ctx),
                                          ntvfs->ctx->event_ctx);
        status = smb_composite_connect_recv(creq, p);
index 8a066b4b435f4a7983ab09bf18a4b440436f5bf8..adb60a4f9b90c77817db172d96a148b98aa9e61b 100644 (file)
@@ -881,7 +881,7 @@ static struct composite_context *torture_connect_async(
        lpcfg_smbcli_options(tctx->lp_ctx, &smb->in.options);
        lpcfg_smbcli_session_options(tctx->lp_ctx, &smb->in.session_options);
        
-       return smb_composite_connect_send(smb,mem_ctx,
+       return smb_composite_connect_send(smb,mem_ctx, tctx->lp_ctx,
                                          lpcfg_resolve_context(tctx->lp_ctx),ev);
 }
 
index b226eb07d0c40c34a36051a7db4e3d70c311b457..fd3ea0fe6633df1c102ba290cd6c8dd87d7daa67 100644 (file)
@@ -205,6 +205,7 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
        state->tree = NULL;
 
        ctx = smb_composite_connect_send(io, state->mem_ctx,
+                                        state->tctx->lp_ctx,
                                         lpcfg_resolve_context(state->tctx->lp_ctx),
                                         state->ev);
        if (ctx == NULL) {
index 0482adb90312bfd5cb5bab1b7535ea4d437b0fb0..5b0556c82dbf3e2ac268dbbd74510c24ff12c27a 100644 (file)
@@ -149,6 +149,7 @@ static void reopen_connection(struct tevent_context *ev, struct tevent_timer *te
        state->close_fnum = -1;
 
        ctx = smb_composite_connect_send(io, state->mem_ctx,
+                                        state->tctx->lp_ctx,
                                         lpcfg_resolve_context(state->tctx->lp_ctx),
                                         state->ev);
        if (ctx == NULL) {