]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: smbd_server_connection_terminate() may return
authorRalph Boehme <slow@samba.org>
Tue, 22 Oct 2024 05:56:53 +0000 (07:56 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 5 Nov 2024 14:39:30 +0000 (14:39 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15608

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/smbd/smb2_negprot.c

index f66ec2aa47f98ad8ada61a25104a1fbcc798b49e..b656865a2c88409cb958461fbbb97253d951ac3d 100644 (file)
@@ -911,10 +911,7 @@ static void smbd_smb2_request_process_negprot_mc_done(struct tevent_req *subreq)
                                                NT_STATUS_CONNECTION_IN_USE);
                smbd_server_connection_terminate(xconn,
                                                 "passed connection");
-               /*
-                * smbd_server_connection_terminate() should not return!
-                */
-               smb_panic(__location__);
+               exit_server_cleanly("connection passed");
                return;
        }
        if (!NT_STATUS_IS_OK(status)) {
@@ -927,10 +924,7 @@ static void smbd_smb2_request_process_negprot_mc_done(struct tevent_req *subreq)
                 * The connection was passed to another process
                 */
                smbd_server_connection_terminate(xconn, nt_errstr(status));
-               /*
-                * smbd_server_connection_terminate() should not return!
-                */
-               smb_panic(__location__);
+               exit_server_cleanly("connection passed");
                return;
        }
 
@@ -959,10 +953,7 @@ static void smbd_smb2_request_process_negprot_mc_done(struct tevent_req *subreq)
         * The connection was passed to another process
         */
        smbd_server_connection_terminate(xconn, nt_errstr(status));
-       /*
-        * smbd_server_connection_terminate() should not return!
-        */
-       smb_panic(__location__);
+       exit_server_cleanly("connection passed");
        return;
 }