r4095: smbsrv_terminate_connection() doesn't exit() in single processor mode, so...
authorAndrew Tridgell <tridge@samba.org>
Wed, 8 Dec 2004 08:09:42 +0000 (08:09 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:06:25 +0000 (13:06 -0500)
call it we need to return, and not continue processing packets
(This used to be commit 33e4cee17dbfbb79e5ae68fda893a4d313865eb5)

source4/smb_server/negprot.c
source4/smb_server/reply.c
source4/smb_server/request.c

index 1c2e1ff7f83062aa5a87108e13129c4f36f36602..e903969aa7c68161b342ddaf003c833a6166867d 100644 (file)
@@ -63,6 +63,7 @@ static void reply_corep(struct smbsrv_request *req, uint16_t choice)
        if (req->smb_conn->signing.mandatory_signing) {
                smbsrv_terminate_connection(req->smb_conn, 
                                            "CORE does not support SMB signing, and it is mandetory\n");
+               return;
        }
 
        req_send_reply(req);
@@ -95,6 +96,7 @@ static void reply_coreplus(struct smbsrv_request *req, uint16_t choice)
        if (req->smb_conn->signing.mandatory_signing) {
                smbsrv_terminate_connection(req->smb_conn, 
                                            "COREPLUS does not support SMB signing, and it is mandetory\n");
+               return;
        }
 
        req_send_reply(req);
@@ -145,6 +147,7 @@ static void reply_lanman1(struct smbsrv_request *req, uint16_t choice)
        if (req->smb_conn->signing.mandatory_signing) {
                smbsrv_terminate_connection(req->smb_conn, 
                                            "LANMAN1 does not support SMB signing, and it is mandetory\n");
+               return;
        }
 
        req_send_reply(req);    
@@ -193,6 +196,7 @@ static void reply_lanman2(struct smbsrv_request *req, uint16_t choice)
        if (req->smb_conn->signing.mandatory_signing) {
                smbsrv_terminate_connection(req->smb_conn, 
                                            "LANMAN2 does not support SMB signing, and it is mandetory\n");
+               return;
        }
 
        req_send_reply(req);
index d81b2bfeefb84479bb0197813efd2fb51073eefd..708dae05ff15751f0aff009d02906e6aa86362be 100644 (file)
@@ -2378,14 +2378,17 @@ void reply_special(struct smbsrv_request *req)
        switch (msg_type) {
        case 0x81: /* session request */
                if (req->smb_conn->negotiate.done_nbt_session) {
-                       smbsrv_terminate_connection(req->smb_conn, "multiple session request not permitted");
+                       smbsrv_terminate_connection(req->smb_conn, 
+                                                   "multiple session request not permitted");
+                       return;
                }
                
                SCVAL(buf,0,0x82);
                SCVAL(buf,3,0);
                
                DEBUG(0,("REWRITE: not parsing netbios names in NBT session request!\n"));
-               /* TODO: store the name for the session setup 'remote machine' code, as well as smbstatus */
+               /* TODO: store the name for the session setup 'remote
+                  machine' code, as well as smbstatus */
 
                req->smb_conn->negotiate.done_nbt_session = True;
                
index 4e63acdd924d1d2f29814d57c22be8b7287428ae..7f13998605ea742660bf348b408944361c900daf 100644 (file)
@@ -86,6 +86,7 @@ static void req_setup_chain_reply(struct smbsrv_request *req, uint_t wct, uint_t
        req->out.buffer = talloc_realloc(req, req->out.buffer, req->out.allocated);
        if (!req->out.buffer) {
                smbsrv_terminate_connection(req->smb_conn, "allocation failed");
+               return;
        }
 
        req->out.hdr = req->out.buffer + NBT_HDR_SIZE;
@@ -120,6 +121,7 @@ void req_setup_reply(struct smbsrv_request *req, uint_t wct, uint_t buflen)
        req->out.buffer = talloc(req, req->out.allocated);
        if (!req->out.buffer) {
                smbsrv_terminate_connection(req->smb_conn, "allocation failed");
+               return;
        }
 
        req->out.hdr = req->out.buffer + NBT_HDR_SIZE;