From 50b59b4c28bc816094a4ca97f64450860e2495b2 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 27 Aug 2020 16:46:29 +0200 Subject: [PATCH] s3:libsmb: Remove max_protocol from clidfs do_connect() The if check for max_protocol == 0 is part of lp_client_max_protocol(). Signed-off-by: Andreas Schneider Reviewed-by: Jeremy Allison --- source3/libsmb/clidfs.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 023dd4d2757..ee5becf76a6 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -107,7 +107,6 @@ static NTSTATUS do_connect(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, @@ -167,14 +166,11 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx, return status; } - if (max_protocol == 0) { - max_protocol = PROTOCOL_LATEST; - } DEBUG(4,(" session request ok\n")); status = smbXcli_negprot(c->conn, c->timeout, lp_client_min_protocol(), - max_protocol); + lp_client_max_protocol()); if (!NT_STATUS_IS_OK(status)) { d_printf("protocol negotiation failed: %s\n", @@ -233,7 +229,6 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx, cli_shutdown(c); return do_connect(ctx, newserver, newshare, creds, - max_protocol, NULL, port, name_type, pcli); } @@ -303,7 +298,6 @@ static NTSTATUS cli_cm_connect(TALLOC_CTX *ctx, status = do_connect(ctx, server, share, creds, - lp_client_max_protocol(), dest_ss, port, name_type, &cli); if (!NT_STATUS_IS_OK(status)) { -- 2.47.3