]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:libsmb: set min smb protocol when enforcing smb1 on connect
authorBjörn Baumbach <bb@sernet.de>
Wed, 28 Aug 2019 12:11:02 +0000 (14:11 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Dec 2020 13:59:37 +0000 (13:59 +0000)
Otherwise the connect fails if the configured client min protocol is
higher than NT1.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14105

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/cliconnect.c

index c0c03fbdd23b55b5621eaa0a5eaf3dfacfff3270..bec2c3e9e07164df919d80c77fefe672da5d7476 100644 (file)
@@ -2798,7 +2798,10 @@ static struct tevent_req *cli_start_connection_send(
        }
 
        if (flags & CLI_FULL_CONNECTION_FORCE_SMB1) {
-               state->max_protocol = MIN(state->max_protocol, PROTOCOL_NT1);
+               state->max_protocol = MIN(state->max_protocol,
+                                         PROTOCOL_NT1);
+               state->min_protocol = MIN(state->min_protocol,
+                                         state->max_protocol);
        }
 
        if (flags & CLI_FULL_CONNECTION_DISABLE_SMB1) {