1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s3: smbd: Ensure we exit if supported_protocols[protocol].proto_reply_fn() fails.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
Jeremy Allison 2019-11-26 12:46:16 -08:00
parent f4caa4159b
commit e84910d919

View File

@ -580,6 +580,7 @@ void reply_negprot(struct smb_request *req)
bool signing_required = true;
int max_proto;
int min_proto;
NTSTATUS status;
START_PROFILE(SMBnegprot);
@ -768,7 +769,11 @@ void reply_negprot(struct smb_request *req)
fstrcpy(remote_proto,supported_protocols[protocol].short_name);
reload_services(sconn, conn_snum_used, true);
supported_protocols[protocol].proto_reply_fn(req, choice);
status = supported_protocols[protocol].proto_reply_fn(req, choice);
if (!NT_STATUS_IS_OK(status)) {
exit_server_cleanly("negprot function failed\n");
}
DEBUG(3,("Selected protocol %s\n",supported_protocols[protocol].proto_name));
DBG_INFO("negprot index=%zu\n", choice);