From: Stefan Metzmacher Date: Thu, 10 Apr 2025 14:48:48 +0000 (+0200) Subject: s4:libcli: pass struct loadparm_context to smb_composite_connect_send() X-Git-Tag: tevent-0.17.0~237 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f939cc3160dc5ed6476b010f666dbaca064f1d1;p=thirdparty%2Fsamba.git s4:libcli: pass struct loadparm_context to smb_composite_connect_send() Signed-off-by: Stefan Metzmacher Reviewed-by: Volker Lendecke --- diff --git a/source4/libcli/smb_composite/connect.c b/source4/libcli/smb_composite/connect.c index e8456efe9cd..92bd99f419f 100644 --- a/source4/libcli/smb_composite/connect.c +++ b/source4/libcli/smb_composite/connect.c @@ -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; } diff --git a/source4/libcli/smb_composite/fetchfile.c b/source4/libcli/smb_composite/fetchfile.c index 52cdf756d56..b82bc072d65 100644 --- a/source4/libcli/smb_composite/fetchfile.c +++ b/source4/libcli/smb_composite/fetchfile.c @@ -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; diff --git a/source4/libcli/smb_composite/fsinfo.c b/source4/libcli/smb_composite/fsinfo.c index 480492c5132..017658d9947 100644 --- a/source4/libcli/smb_composite/fsinfo.c +++ b/source4/libcli/smb_composite/fsinfo.c @@ -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; diff --git a/source4/libcli/smb_composite/smb_composite.h b/source4/libcli/smb_composite/smb_composite.h index 1b5e398ebf8..002d6cb7e30 100644 --- a/source4/libcli/smb_composite/smb_composite.h +++ b/source4/libcli/smb_composite/smb_composite.h @@ -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); diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c index 901bed5633c..b0acd9450ed 100644 --- a/source4/librpc/rpc/dcerpc_connect.c +++ b/source4/librpc/rpc/dcerpc_connect.c @@ -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; diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index a749ee5fc30..a43f91070bd 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -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); diff --git a/source4/torture/basic/misc.c b/source4/torture/basic/misc.c index 8a066b4b435..adb60a4f9b9 100644 --- a/source4/torture/basic/misc.c +++ b/source4/torture/basic/misc.c @@ -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); } diff --git a/source4/torture/raw/lockbench.c b/source4/torture/raw/lockbench.c index b226eb07d0c..fd3ea0fe663 100644 --- a/source4/torture/raw/lockbench.c +++ b/source4/torture/raw/lockbench.c @@ -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) { diff --git a/source4/torture/raw/openbench.c b/source4/torture/raw/openbench.c index 0482adb9031..5b0556c82db 100644 --- a/source4/torture/raw/openbench.c +++ b/source4/torture/raw/openbench.c @@ -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) {