From: Björn Baumbach Date: Thu, 29 Aug 2019 10:13:50 +0000 (+0200) Subject: s3:libsmb: set correct min and max smb protocol when smb2 is enforced on connect X-Git-Tag: samba-4.14.0rc1~245 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=76121ae7cf4967329b9745137999fde00309c987;p=thirdparty%2Fsamba.git s3:libsmb: set correct min and max smb protocol when smb2 is enforced on connect BUG: https://bugzilla.samba.org/show_bug.cgi?id=14105 Pair-programmed-with: Stefan Metzmacher Signed-off-by: Björn Baumbach Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index bec2c3e9e07..8ee60df0c99 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -2805,8 +2805,10 @@ static struct tevent_req *cli_start_connection_send( } if (flags & CLI_FULL_CONNECTION_DISABLE_SMB1) { - state->min_protocol = MAX(state->max_protocol, PROTOCOL_SMB2_02); - state->max_protocol = MAX(state->max_protocol, PROTOCOL_LATEST); + state->min_protocol = MAX(state->min_protocol, + PROTOCOL_SMB2_02); + state->max_protocol = MAX(state->max_protocol, + state->min_protocol); } subreq = cli_connect_nb_send(state, ev, dest_host, dest_ss, port,