1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-04 00:23:49 +03:00

r11789: - add the start of a SMB2 server

- it does Negprot and SessionSetup yet
  the rest returns NT_STATUS_NOT_IMPLEMENTED
- it's off by default, enable with:
  smbsrv:enable smb2 = yes
- negotition in the SMB Negprot isn't supported yet
- it's only tested with smbtorture SMB2-CONNECT
  not with vista as client

metze
This commit is contained in:
Stefan Metzmacher
2005-11-18 14:13:49 +00:00
committed by Gerald (Jerry) Carter
parent 27a2615876
commit 08b31d5f61
10 changed files with 823 additions and 5 deletions

View File

@@ -27,6 +27,7 @@
#include "smb_server/smb_server.h"
#include "lib/messaging/irpc.h"
#include "lib/stream/packet.h"
#include "libcli/smb2/smb2.h"
static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
{
@@ -56,6 +57,12 @@ static NTSTATUS smbsrv_recv_generic_request(void *private, DATA_BLOB blob)
NT_STATUS_NOT_OK_RETURN(status);
packet_set_callback(smb_conn->packet, smbsrv_recv_smb_request);
return smbsrv_recv_smb_request(smb_conn, blob);
case SMB2_MAGIC:
if (!lp_parm_bool(-1, "smbsrv", "enable smb2", False)) break;
status = smbsrv_init_smb2_connection(smb_conn);
NT_STATUS_NOT_OK_RETURN(status);
packet_set_callback(smb_conn->packet, smbsrv_recv_smb2_request);
return smbsrv_recv_smb2_request(smb_conn, blob);
}
DEBUG(2,("Invalid SMB packet: protocl prefix: 0x%08X\n", protocol_version));