From: Björn Baumbach Date: Wed, 28 Aug 2019 12:11:02 +0000 (+0200) Subject: s3:libsmb: set min smb protocol when enforcing smb1 on connect X-Git-Tag: samba-4.14.0rc1~246 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f40da74e1452e73799f8643d93b8b9e572df1088;p=thirdparty%2Fsamba.git s3:libsmb: set min smb protocol when enforcing smb1 on connect 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 Reviewed-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index c0c03fbdd23..bec2c3e9e07 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -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) {