1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:smbd: add smbXsrv_session infrastructure

Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze
This commit is contained in:
Stefan Metzmacher 2011-12-15 14:45:56 +01:00
parent 5b3c07fa89
commit 85f8c14f30
5 changed files with 1164 additions and 0 deletions

View File

@ -976,6 +976,7 @@ SMBD_OBJ_SRV = smbd/server_reload.o \
smbd/smb2_break.o \
autoconf/librpc/gen_ndr/ndr_smbXsrv.o \
smbd/smbXsrv_version.o \
smbd/smbXsrv_session.o \
$(MANGLE_OBJ) @VFS_STATIC@
SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \

View File

@ -19,6 +19,7 @@
*/
#include "system/select.h"
#include "librpc/gen_ndr/smbXsrv.h"
#if defined(HAVE_AIO)
struct aio_extra;
@ -354,6 +355,8 @@ struct smbXsrv_connection {
struct msg_state *msg_state;
uint64_t smbd_idle_profstamp;
struct smbXsrv_session_table *session_table;
};
NTSTATUS smbXsrv_version_global_init(const struct server_id *server_id);
@ -362,6 +365,22 @@ uint32_t smbXsrv_version_global_current(void);
NTSTATUS smbXsrv_connection_init_tables(struct smbXsrv_connection *conn,
enum protocol_types protocol);
NTSTATUS smbXsrv_session_global_init(void);
NTSTATUS smbXsrv_session_create(struct smbXsrv_connection *conn,
NTTIME now,
struct smbXsrv_session **_session);
NTSTATUS smbXsrv_session_update(struct smbXsrv_session *session);
NTSTATUS smbXsrv_session_logoff(struct smbXsrv_session *session);
NTSTATUS smbXsrv_session_logoff_all(struct smbXsrv_connection *conn);
NTSTATUS smb1srv_session_table_init(struct smbXsrv_connection *conn);
NTSTATUS smb1srv_session_lookup(struct smbXsrv_connection *conn,
uint16_t vuid, NTTIME now,
struct smbXsrv_session **session);
NTSTATUS smb2srv_session_table_init(struct smbXsrv_connection *conn);
NTSTATUS smb2srv_session_lookup(struct smbXsrv_connection *conn,
uint64_t session_id, NTTIME now,
struct smbXsrv_session **session);
struct smbd_smb2_request {
struct smbd_smb2_request *prev, *next;

View File

@ -1387,6 +1387,10 @@ extern void build_options(bool screen);
if (!sessionid_init()) {
exit(1);
}
status = smbXsrv_session_global_init();
if (!NT_STATUS_IS_OK(status)) {
exit(1);
}
if (!connections_init(True))
exit(1);

File diff suppressed because it is too large Load Diff

View File

@ -376,6 +376,7 @@ SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
smbd/smb2_setinfo.c
smbd/smb2_break.c
smbd/smbXsrv_version.c
smbd/smbXsrv_session.c
smbd/server_exit.c
${MANGLE_SRC}'''