]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:libcli: remove unused ports from smbcli_full_connection()
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Apr 2025 08:49:30 +0000 (10:49 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2025 10:17:29 +0000 (10:17 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
17 files changed:
source4/client/cifsddio.c
source4/client/client.c
source4/lib/policy/gp_filesys.c
source4/libcli/cliconnect.c
source4/libcli/libcli.h
source4/torture/locktest.c
source4/torture/masktest.c
source4/torture/raw/oplock.c
source4/torture/raw/session.c
source4/torture/raw/tconrate.c
source4/torture/rpc/iremotewinspool_driver.c
source4/torture/rpc/join.c
source4/torture/rpc/samba3rpc.c
source4/torture/rpc/spoolss.c
source4/torture/unix/unix_info2.c
source4/torture/unix/whoami.c
source4/torture/util_smb.c

index 0163daa25209214be18331734f2cb9fbdba23b44..203652e71edb483c9c47fc0bf45836815e51d839 100644 (file)
@@ -235,7 +235,7 @@ static struct smbcli_state * init_smb_session(struct resolve_context *resolve_ct
        /* When we support SMB URLs, we can get different user credentials for
         * each connection, but for now, we just use the same one for both.
         */
-       ret = smbcli_full_connection(NULL, &cli, host, ports, share,
+       ret = smbcli_full_connection(NULL, &cli, host, share,
                                NULL /* devtype */,
                                socket_options,
                                samba_cmdline_get_creds(),
index bbbe888bc36bee60a5c4272b2176f0ff9041d308..08c56f55edcee8d7b849b0a2c30a33e688cd8017 100644 (file)
@@ -3219,7 +3219,7 @@ static bool do_connect(struct smbclient_context *ctx,
                return false;
        }
 
-       status = smbcli_full_connection(ctx, &ctx->cli, server, ports,
+       status = smbcli_full_connection(ctx, &ctx->cli, server,
                                        share, NULL,
                                        socket_options,
                                        cred, resolve_ctx,
index bac4ae7f8c4fb36ef8751df0da502f4122fdfa1a..9840e6f74ba0f722c244815557cae284f7b0474a 100644 (file)
@@ -166,7 +166,6 @@ static NTSTATUS gp_cli_connect(struct gp_context *gp_ctx)
        return smbcli_full_connection(gp_ctx,
                        &gp_ctx->cli,
                        gp_ctx->active_dc->name,
-                       lpcfg_smb_ports(gp_ctx->lp_ctx),
                        "sysvol",
                        NULL,
                        lpcfg_socket_options(gp_ctx->lp_ctx),
index f9fb18d9faa3f5c72bdb5eb3da710eaa3c48c6e4..c776efef1bff61cbe4d9c36bb665762596292fb9 100644 (file)
@@ -163,7 +163,6 @@ out:
 NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
                                struct smbcli_state **ret_cli, 
                                const char *host,
-                               const char **ports,
                                const char *sharename,
                                const char *devtype,
                                const char *socket_options,
index 27b7c36370e3d1ef4fe71e1f708f59f5cca92905..9b15f31b1c9c71e862021cbba0bd6bd1a80a6556 100644 (file)
@@ -104,7 +104,6 @@ NTSTATUS smbcli_tconX(struct smbcli_state *cli, const char *sharename,
 NTSTATUS smbcli_full_connection(TALLOC_CTX *parent_ctx,
                                struct smbcli_state **ret_cli, 
                                const char *host,
-                               const char **ports,
                                const char *sharename,
                                const char *devtype,
                                const char *socket_options,
index b720261e565ee2bfa38813394283f190b0014175..11382d4b18d0d879daceabfcf71bdd12662b7952 100644 (file)
@@ -162,7 +162,6 @@ static struct smbcli_state *connect_one(struct tevent_context *ev,
                printf("\\\\%s\\%s\n", server, share);
                status = smbcli_full_connection(NULL, &c, 
                                                server, 
-                                               lpcfg_smb_ports(lp_ctx),
                                                share, NULL,
                                                lpcfg_socket_options(lp_ctx),
                                                servers[snum], 
index e311769a43d804935acd663197171d4d199b1508..3719692b5f741abef7fa7ddacd619834cc104c39 100644 (file)
@@ -96,7 +96,6 @@ static struct smbcli_state *connect_one(struct resolve_context *resolve_ctx,
 
        status = smbcli_full_connection(NULL, &c,
                                        server, 
-                                       ports,
                                        share, NULL,
                                        socket_options,
                                        creds,
index b13dffefe6ce517333586dc25614834b909d7424..bbbba9fb383e9fab15a8513b6f8755968b1f51f9 100644 (file)
@@ -184,7 +184,6 @@ static bool open_connection_no_level2_oplocks(struct torture_context *tctx,
 
        status = smbcli_full_connection(tctx, c,
                                        torture_setting_string(tctx, "host", NULL),
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        torture_setting_string(tctx, "share", NULL),
                                        NULL, lpcfg_socket_options(tctx->lp_ctx),
                                        samba_cmdline_get_creds(),
index 76ae8089240d13089255a275a32420eb7286d21c..9ceb9897eac651a71932fb85f8ed517effc7561b 100644 (file)
@@ -267,7 +267,6 @@ static bool test_session_expire1(struct torture_context *tctx)
 
        status = smbcli_full_connection(tctx, &cli,
                                        host,
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        share, NULL,
                                        lpcfg_socket_options(tctx->lp_ctx),
                                        samba_cmdline_get_creds(),
index e514e7ae24f1ca8078df6fb48197c66f33d70e9f..65c6ceff2fdc18f985c9ff3c210d793a3ee8d4cc 100644 (file)
@@ -99,7 +99,7 @@ static int fork_tcon_client(struct torture_context *tctx,
                NTSTATUS status;
 
                status = smbcli_full_connection(NULL, &cli,
-                               host, lpcfg_smb_ports(tctx->lp_ctx), share,
+                               host, share,
                                NULL, lpcfg_socket_options(tctx->lp_ctx),
                                samba_cmdline_get_creds(),
                                lpcfg_resolve_context(tctx->lp_ctx),
index 4e558ef742c4f5f5adeda66087cd27912b8de38b..f91f86cc17030f64a92fc44044c3ee7e0ca89c9f 100644 (file)
@@ -62,7 +62,6 @@ static bool smb_connect_print_share(struct torture_context *tctx,
 
        /* On Windows, SMB1 must be enabled! */
        status = smbcli_full_connection(tctx, cli, server_name,
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        share_name, NULL,
                                        lpcfg_socket_options(tctx->lp_ctx),
                                        samba_cmdline_get_creds(),
index 6e0afcac28187ed2436288867f68a2729388e580..23fcbfbfa34338119de30025d81826b3a67fa615 100644 (file)
@@ -35,7 +35,6 @@ bool torture_rpc_join(struct torture_context *torture)
        lpcfg_smbcli_session_options(torture->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tj, &cli, host,
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        machine_account,
@@ -63,7 +62,6 @@ bool torture_rpc_join(struct torture_context *torture)
        }
 
        status = smbcli_full_connection(tj, &cli, host,
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        machine_account,
index 3fc6f347a3636907207200a2b2bda8b2798cfcab..72f2b1f6252bfcf089d3997869f1e24dff823015 100644 (file)
@@ -193,7 +193,6 @@ bool torture_bind_authcontext(struct torture_context *torture)
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        samba_cmdline_get_creds(),
@@ -428,7 +427,6 @@ static bool torture_bind_samba3(struct torture_context *torture)
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        samba_cmdline_get_creds(),
@@ -1403,7 +1401,6 @@ static bool torture_netlogon_samba3(struct torture_context *torture)
 
        status = smbcli_full_connection(torture, &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        samba_cmdline_get_creds(),
@@ -1483,7 +1480,6 @@ static bool test_join3(struct torture_context *tctx,
 
        status = smbcli_full_connection(tctx, &cli,
                                        torture_setting_string(tctx, "host", NULL),
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        "IPC$", NULL, lpcfg_socket_options(tctx->lp_ctx),
                                        smb_creds, lpcfg_resolve_context(tctx->lp_ctx),
                                        tctx->ev, &options, &session_options,
@@ -1808,7 +1804,7 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture)
 
        status = smbcli_full_connection(
                torture, &cli, torture_setting_string(torture, "host", NULL),
-               lpcfg_smb_ports(torture->lp_ctx), "IPC$", NULL,
+               "IPC$", NULL,
                lpcfg_socket_options(torture->lp_ctx), anon_creds,
                lpcfg_resolve_context(torture->lp_ctx),
                torture->ev, &options, &session_options,
@@ -1826,7 +1822,6 @@ static bool torture_samba3_rpc_getusername(struct torture_context *torture)
 
        status = smbcli_full_connection(
                torture, &cli, torture_setting_string(torture, "host", NULL),
-               lpcfg_smb_ports(torture->lp_ctx),
                "IPC$", NULL, lpcfg_socket_options(torture->lp_ctx),
                samba_cmdline_get_creds(),
                lpcfg_resolve_context(torture->lp_ctx), torture->ev, &options,
@@ -2465,7 +2460,6 @@ static bool torture_samba3_rpc_sharesec(struct torture_context *torture)
        status = smbcli_full_connection(torture,
                                        &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$",
                                        NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
@@ -3430,7 +3424,6 @@ static bool torture_rpc_smb_reauth1(struct torture_context *torture)
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        samba_cmdline_get_creds(),
@@ -3589,7 +3582,6 @@ static bool torture_rpc_smb_reauth2(struct torture_context *torture)
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        samba_cmdline_get_creds(),
@@ -3988,7 +3980,6 @@ static bool torture_rpc_smb1_pipe_name(struct torture_context *torture)
 
        status = smbcli_full_connection(mem_ctx, &cli,
                                        torture_setting_string(torture, "host", NULL),
-                                       lpcfg_smb_ports(torture->lp_ctx),
                                        "IPC$", NULL,
                                        lpcfg_socket_options(torture->lp_ctx),
                                        samba_cmdline_get_creds(),
index cff98b79e0b8d811f94b0891c11218f1a3efccf7..7f0ce6e21c3bc68b8d884d8e15f06f14b43c19b9 100644 (file)
@@ -10793,7 +10793,6 @@ static bool connect_printer_driver_share(struct torture_context *tctx,
 
        torture_assert_ntstatus_ok(tctx,
                smbcli_full_connection(tctx, cli, server_name,
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        share_name, NULL,
                                        lpcfg_socket_options(tctx->lp_ctx),
                                        samba_cmdline_get_creds(),
index cf3ea3786bfa9d9e77d201cb8ac2e0a20592de53..3e4817c5243632bd32a27d56a2183b46e751e8b7 100644 (file)
@@ -63,7 +63,6 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx)
        lpcfg_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tctx, &cli, host, 
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        share, NULL, lpcfg_socket_options(tctx->lp_ctx),
                                        samba_cmdline_get_creds(),
                                        lpcfg_resolve_context(tctx->lp_ctx),
index 28b1f87541ba11f706d19548d08a5bddcf175f90..7e61223e13b685cf06adfa30796cf8a011f608bb 100644 (file)
@@ -85,7 +85,6 @@ static struct smbcli_state *connect_to_server(struct torture_context *tctx,
        lpcfg_smbcli_session_options(tctx->lp_ctx, &session_options);
 
        status = smbcli_full_connection(tctx, &cli, host, 
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        share, NULL, lpcfg_socket_options(tctx->lp_ctx),
                                        creds, lpcfg_resolve_context(tctx->lp_ctx),
                                        tctx->ev, &options, &session_options,
index 3bad0b0ed40752e3aabf52524765510a9ce20b81..0556325594ec123e036109a1d89831dfeb9eb694 100644 (file)
@@ -457,7 +457,6 @@ _PUBLIC_ bool torture_open_connection_share(TALLOC_CTX *mem_ctx,
        options.use_level2_oplocks = torture_setting_bool(tctx, "use_level2_oplocks", true);
 
        status = smbcli_full_connection(mem_ctx, c, hostname, 
-                                       lpcfg_smb_ports(tctx->lp_ctx),
                                        sharename, NULL,
                                        lpcfg_socket_options(tctx->lp_ctx),
                                        samba_cmdline_get_creds(),