]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:libcli: pass struct loadparm_context to smbcli_socket_connect()
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/client/client.c
source4/libcli/cliconnect.c
source4/libcli/libcli.h
source4/torture/basic/base.c

index d1954be912d19502e5584f6d1ffa0425efc84175..9ac1a5bc0a811a0a63b515ffbf8afe46e66a9d43 100644 (file)
@@ -3256,6 +3256,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
                         const char *destip,
                         int name_type,
                         struct tevent_context *ev_ctx,
+                        struct loadparm_context *lp_ctx,
                         struct resolve_context *resolve_ctx,
                         struct smbcli_options *options,
              const char *socket_options)
@@ -3278,7 +3279,7 @@ static int do_message_op(const char *netbios_name, const char *desthost,
        }
 
        ok = smbcli_socket_connect(cli, server_name,
-                                  ev_ctx, resolve_ctx, options,
+                                  ev_ctx, lp_ctx, resolve_ctx, options,
                                   socket_options,
                                   &calling, &called);
        if (!ok) {
@@ -3524,6 +3525,7 @@ int main(int argc, char *argv[])
                rc = do_message_op(lpcfg_netbios_name(lp_ctx), desthost,
                                   dest_ip,
                                   name_type, ev_ctx,
+                                  lp_ctx,
                                   lpcfg_resolve_context(lp_ctx),
                                   &smb_options,
                    lpcfg_socket_options(lp_ctx));
index c776efef1bff61cbe4d9c36bb665762596292fb9..efe83c2226258afeadc4c81a4ffed637473d70dc 100644 (file)
@@ -33,6 +33,7 @@
 */
 bool smbcli_socket_connect(struct smbcli_state *cli, const char *server, 
                           struct tevent_context *ev_ctx,
+                          struct loadparm_context *lp_ctx,
                           struct resolve_context *resolve_ctx,
                           struct smbcli_options *options,
                           const char *socket_options,
index 9b15f31b1c9c71e862021cbba0bd6bd1a80a6556..0bc70e9209708ccf1ce31f0aa00f2f2849b3d9d7 100644 (file)
@@ -88,6 +88,7 @@ ssize_t smbcli_smbwrite(struct smbcli_tree *tree,
 
 bool smbcli_socket_connect(struct smbcli_state *cli, const char *server, 
                           struct tevent_context *ev_ctx,
+                          struct loadparm_context *lp_ctx,
                           struct resolve_context *resolve_ctx,
                           struct smbcli_options *options,
                           const char *socket_options,
index 8baecf4553913254d355392f60f8c479abcb89fd..e48e68d1a50c1083260b5649d5dac6941b2a7cbd 100644 (file)
@@ -56,6 +56,7 @@ static struct smbcli_state *open_nbt_connection(struct torture_context *tctx)
 
        ok = smbcli_socket_connect(cli, host,
                                   tctx->ev,
+                                  tctx->lp_ctx,
                                   lpcfg_resolve_context(tctx->lp_ctx),
                                   &options,
                                   lpcfg_socket_options(tctx->lp_ctx),