The branch, master has been updated
       via  c9a3661... Fix the "allow_smb2" bug being set to false that was 
driving me mad :-).
      from  3c585e9... s4:provisionbackend Don't loop forever waiting for 
OpenLDAP

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


- Log -----------------------------------------------------------------
commit c9a3661c4b0997172782c55de4a3b15dff2c6ea4
Author: Jeremy Allison <[email protected]>
Date:   Tue Apr 27 22:15:17 2010 -0700

    Fix the "allow_smb2" bug being set to false that was driving me mad :-).
    
    The first packet from a rebooted Win7 on an SMB2 connection is an SMB1
    negprot...
    
    Jeremy.

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

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 1ba1db5..53c5e0b 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -1633,8 +1633,12 @@ static void process_smb(struct smbd_server_connection 
*conn,
                if (smbd_is_smb2_header(inbuf, nread)) {
                        smbd_smb2_first_negprot(smbd_server_conn, inbuf, nread);
                        return;
+               } else if (nread >= smb_size && valid_smb_header(inbuf)
+                               && CVAL(inbuf, smb_com) != 0x72) {
+                       /* This is a non-negprot SMB1 packet.
+                          Disable SMB2 from now on. */
+                       smbd_server_conn->allow_smb2 = false;
                }
-               smbd_server_conn->allow_smb2 = false;
        }
 
        show_msg((char *)inbuf);


-- 
Samba Shared Repository

Reply via email to