s3:libsmb: Remove max_protocol from cli_cm_open()
authorAndreas Schneider <asn@samba.org>
Thu, 27 Aug 2020 14:43:46 +0000 (16:43 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 9 Oct 2020 19:16:46 +0000 (19:16 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/client/client.c
source3/lib/netapi/cm.c
source3/libsmb/clidfs.c
source3/libsmb/proto.h

index 94d7b57647c35dc231ddf7ea82fba69565f87bac..392b23f06ea85608a2b79f5b18e565de5c3921e0 100644 (file)
@@ -5644,7 +5644,6 @@ static int process_command_string(const char *cmd_in)
                                     desthost,
                                     service,
                                     creds,
-                                    lp_client_max_protocol(),
                                     have_ip ? &dest_ss : NULL, port,
                                     name_type,
                                     &cli);
@@ -6094,7 +6093,6 @@ static int process(const char *base_directory)
                             desthost,
                             service,
                             creds,
-                            lp_client_max_protocol(),
                             have_ip ? &dest_ss : NULL, port,
                             name_type, &cli);
        if (!NT_STATUS_IS_OK(status)) {
@@ -6135,7 +6133,6 @@ static int do_host_query(const char *query_host)
                             query_host,
                             "IPC$",
                             creds,
-                            lp_client_max_protocol(),
                             have_ip ? &dest_ss : NULL, port,
                             name_type, &cli);
        if (!NT_STATUS_IS_OK(status)) {
@@ -6170,8 +6167,6 @@ static int do_host_query(const char *query_host)
        if (port != NBT_SMB_PORT ||
            smbXcli_conn_protocol(cli->conn) > PROTOCOL_NT1)
        {
-               int max_proto = MIN(lp_client_max_protocol(), PROTOCOL_NT1);
-
                /*
                 * Workgroups simply don't make sense over anything
                 * else but port 139 and SMB1.
@@ -6183,7 +6178,6 @@ static int do_host_query(const char *query_host)
                                     query_host,
                                     "IPC$",
                                     creds,
-                                    max_proto,
                                     have_ip ? &dest_ss : NULL, NBT_SMB_PORT,
                                     name_type, &cli);
                if (!NT_STATUS_IS_OK(status)) {
@@ -6220,7 +6214,6 @@ static int do_tar_op(const char *base_directory)
                                     desthost,
                                     service,
                                     creds,
-                                    lp_client_max_protocol(),
                                     have_ip ? &dest_ss : NULL, port,
                                     name_type, &cli);
                if (!NT_STATUS_IS_OK(status)) {
index 943f7498e8c8b6c641a413646ff8632db93177d4..3f4e188b39656db4874c0d3fb831a705d96243df 100644 (file)
@@ -112,7 +112,6 @@ static WERROR libnetapi_open_ipc_connection(struct libnetapi_ctx *ctx,
        status = cli_cm_open(ctx, NULL,
                             server_name, "IPC$",
                             creds,
-                            lp_client_ipc_max_protocol(),
                             NULL, 0, 0x20, &cli_ipc);
        if (!NT_STATUS_IS_OK(status)) {
                cli_ipc = NULL;
index e6695159a96774c89e3eb57124cf2bc05a741e3d..fb1a0c72e6d777e8968e52c51f1bd36131544b7a 100644 (file)
@@ -388,7 +388,6 @@ NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
                     const char *server,
                     const char *share,
                     struct cli_credentials *creds,
-                    int max_protocol,
                     const struct sockaddr_storage *dest_ss,
                     int port,
                     int name_type,
@@ -417,7 +416,7 @@ NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
                                server,
                                share,
                                creds,
-                               max_protocol,
+                               lp_client_max_protocol(),
                                dest_ss,
                                port,
                                name_type,
@@ -965,7 +964,6 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx,
                             smbXcli_conn_remote_name(rootcli->conn),
                             "IPC$",
                             creds,
-                            smbXcli_conn_protocol(rootcli->conn),
                             NULL, /* dest_ss not needed, we reuse the transport */
                             0,
                             0x20,
index bd902ca61914d6bd54915b9fde82ac9bd4e50038..0e036c5ddc8e88d6052f5612072bb70908583a12 100644 (file)
@@ -128,7 +128,6 @@ NTSTATUS cli_cm_open(TALLOC_CTX *ctx,
                     const char *server,
                     const char *share,
                     struct cli_credentials *creds,
-                    int max_protocol,
                     const struct sockaddr_storage *dest_ss,
                     int port,
                     int name_type,