Author: tridge Date: 2004-12-08 08:09:42 +0000 (Wed, 08 Dec 2004) New Revision: 4095
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4095 Log: smbsrv_terminate_connection() doesn't exit() in single processor mode, so after we call it we need to return, and not continue processing packets Modified: branches/SAMBA_4_0/source/smb_server/negprot.c branches/SAMBA_4_0/source/smb_server/reply.c branches/SAMBA_4_0/source/smb_server/request.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/negprot.c =================================================================== --- branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-08 03:02:29 UTC (rev 4094) +++ branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-08 08:09:42 UTC (rev 4095) @@ -63,6 +63,7 @@ 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 @@ 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 @@ 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 @@ 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); Modified: branches/SAMBA_4_0/source/smb_server/reply.c =================================================================== --- branches/SAMBA_4_0/source/smb_server/reply.c 2004-12-08 03:02:29 UTC (rev 4094) +++ branches/SAMBA_4_0/source/smb_server/reply.c 2004-12-08 08:09:42 UTC (rev 4095) @@ -2378,14 +2378,17 @@ 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; Modified: branches/SAMBA_4_0/source/smb_server/request.c =================================================================== --- branches/SAMBA_4_0/source/smb_server/request.c 2004-12-08 03:02:29 UTC (rev 4094) +++ branches/SAMBA_4_0/source/smb_server/request.c 2004-12-08 08:09:42 UTC (rev 4095) @@ -86,6 +86,7 @@ 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 @@ 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;