diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-05-14 14:17:28 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-05-20 15:42:24 +0200 |
commit | 688945a994660fa905836b55a995bb90c3e8e67a (patch) | |
tree | ea93ad930f089ef6048156c6a1f4df88ec010650 /source3/smbd/process.c | |
parent | d23a1935e8180090474cbbba878d5bc5903579c6 (diff) | |
download | samba-688945a994660fa905836b55a995bb90c3e8e67a.tar.gz samba-688945a994660fa905836b55a995bb90c3e8e67a.tar.bz2 samba-688945a994660fa905836b55a995bb90c3e8e67a.zip |
s3:smbd: add infrastructure for SMB2 support
This is disabled by default and activated by
"max protocol = SMB2".
metze
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 0647b99ba0..5cad8bfc9a 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1448,6 +1448,14 @@ static void process_smb(struct smbd_server_connection *conn, goto done; } + if (smbd_server_conn->allow_smb2) { + if (smbd_is_smb2_header(inbuf, nread)) { + smbd_smb2_first_negprot(smbd_server_conn, inbuf, nread); + return; + } + smbd_server_conn->allow_smb2 = false; + } + show_msg((char *)inbuf); construct_reply((char *)inbuf,nread,unread_bytes,seqnum,encrypted,deferred_pcd); @@ -2009,6 +2017,10 @@ void smbd_process(void) exit_server("failed to create smbd_server_connection"); } + if (lp_maxprotocol() == PROTOCOL_SMB2) { + smbd_server_conn->allow_smb2 = true; + } + /* Ensure child is set to blocking mode */ set_blocking(smbd_server_fd(),True); |