From: Andreas Schneider Date: Thu, 27 Aug 2020 14:43:46 +0000 (+0200) Subject: s3:libsmb: Remove max_protocol from cli_cm_open() X-Git-Tag: talloc-2.3.2~275 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4aac9daf095e7c2de6a27697a13385ee87a4b634;p=thirdparty%2Fsamba.git s3:libsmb: Remove max_protocol from cli_cm_open() Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- diff --git a/source3/client/client.c b/source3/client/client.c index 94d7b57647c..392b23f06ea 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -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)) { diff --git a/source3/lib/netapi/cm.c b/source3/lib/netapi/cm.c index 943f7498e8c..3f4e188b396 100644 --- a/source3/lib/netapi/cm.c +++ b/source3/lib/netapi/cm.c @@ -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; diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index e6695159a96..fb1a0c72e6d 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -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, diff --git a/source3/libsmb/proto.h b/source3/libsmb/proto.h index bd902ca6191..0e036c5ddc8 100644 --- a/source3/libsmb/proto.h +++ b/source3/libsmb/proto.h @@ -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,