]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: Remove max_protocol from clidfs do_connect()
authorAndreas Schneider <asn@samba.org>
Thu, 27 Aug 2020 14:46:29 +0000 (16:46 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 9 Oct 2020 19:16:46 +0000 (19:16 +0000)
The if check for max_protocol == 0 is part of lp_client_max_protocol().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/clidfs.c

index 023dd4d275759e9a5246b75c345f21688b53d836..ee5becf76a6c6cd6c5cb752c14dfb7c341bd4fb6 100644 (file)
@@ -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)) {