Make sure smbtorture tests can run if someone has set their min protocol above NT1.
authorRichard Sharpe <richard.sharpe@primarydata.com>
Sun, 10 Sep 2017 19:50:57 +0000 (12:50 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 20 Sep 2017 20:48:15 +0000 (22:48 +0200)
This code is SMB1 only, and already modifies
maxprotocol, so this change is appropriate.

Signed-off-by: Richard Sharpe <richard.sharpe@primarydata.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/libcli/raw/rawnegotiate.c

index f6a189ff8d7157ad2b38c746fd8725d2ea289fb3..73c9123411d6101710ee0168e2234b0032dc9dec 100644 (file)
@@ -56,6 +56,10 @@ struct tevent_req *smb_raw_negotiate_send(TALLOC_CTX *mem_ctx,
                maxprotocol = PROTOCOL_NT1;
        }
 
                maxprotocol = PROTOCOL_NT1;
        }
 
+       if (minprotocol > maxprotocol) {
+               minprotocol = maxprotocol;
+       }
+
        subreq = smbXcli_negprot_send(state, ev,
                                      transport->conn,
                                      timeout_msec,
        subreq = smbXcli_negprot_send(state, ev,
                                      transport->conn,
                                      timeout_msec,