The branch, master has been updated
       via  dec0243 s3:smbd: close the connection if the client doesn't start 
with a SMB1 Negprot or old messaging call.
      from  1f878b9 Revert "buildtools: Rename perl vendorarch configure 
option."

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit dec0243c8595359df6448caf5d242b3d2062deb6
Author: Stefan Metzmacher <me...@samba.org>
Date:   Tue Aug 19 00:15:34 2014 +0200

    s3:smbd: close the connection if the client doesn't start with a SMB1 
Negprot or old messaging call.
    
    The case where the client starts with a SMB2 Negprot is already handled
    in smbd_smb2_request_dispatch().
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10766
    
    Signed-off-by: Stefan Metzmacher <me...@samba.org>
    Signed-off-by: Jeremy Allison <j...@samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <me...@samba.org>
    Autobuild-Date(master): Tue Sep  9 13:02:21 CEST 2014 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source3/smbd/process.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 207a4dd..da36ed1 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1456,6 +1456,24 @@ static connection_struct *switch_message(uint8 type, 
struct smb_request *req)
 
        errno = 0;
 
+       if (!xconn->smb1.negprot.done) {
+               switch (type) {
+                       /*
+                        * Without a negprot the request must
+                        * either be a negprot, or one of the
+                        * evil old SMB mailslot messaging types.
+                        */
+                       case SMBnegprot:
+                       case SMBsendstrt:
+                       case SMBsendend:
+                       case SMBsendtxt:
+                               break;
+                       default:
+                               exit_server_cleanly("The first request "
+                                       "should be a negprot");
+               }
+       }
+
        if (smb_messages[type].fn == NULL) {
                DEBUG(0,("Unknown message type %d!\n",type));
                smb_dump("Unknown", 1, (const char *)req->inbuf);


-- 
Samba Shared Repository

Reply via email to