]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: smbd: Ensure we exit if supported_protocols[protocol].proto_reply_fn() fails.
authorJeremy Allison <jra@samba.org>
Tue, 26 Nov 2019 20:46:16 +0000 (12:46 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 16 Dec 2019 08:22:36 +0000 (08:22 +0000)
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>
(cherry picked from commit e84910d919e02feab2a297fccbbf95f333e32119)

source3/smbd/negprot.c

index 3b2555e3d21f6bb67bbad77509fdeec184841f20..8317dc490869922f3125ee5791131439921f57e4 100644 (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);