mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
CVE-2016-2115: s4:libcli/smb2: use the configured min_protocol
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11756 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
35ce75ec9e
commit
5721234328
@ -134,6 +134,7 @@ static void smb2_connect_socket_done(struct composite_context *creq)
|
||||
struct tevent_req *subreq;
|
||||
NTSTATUS status;
|
||||
uint32_t timeout_msec;
|
||||
enum protocol_types min_protocol;
|
||||
|
||||
status = smbcli_sock_connect_recv(creq, state, &sock);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
@ -146,10 +147,14 @@ static void smb2_connect_socket_done(struct composite_context *creq)
|
||||
}
|
||||
|
||||
timeout_msec = state->transport->options.request_timeout * 1000;
|
||||
min_protocol = state->transport->options.min_protocol;
|
||||
if (min_protocol < PROTOCOL_SMB2_02) {
|
||||
min_protocol = PROTOCOL_SMB2_02;
|
||||
}
|
||||
|
||||
subreq = smbXcli_negprot_send(state, state->ev,
|
||||
state->transport->conn, timeout_msec,
|
||||
PROTOCOL_SMB2_02,
|
||||
min_protocol,
|
||||
state->transport->options.max_protocol);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user