1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

s3:smbd: add smbXsrv_open* infrastructure

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

metze
This commit is contained in:
Stefan Metzmacher 2012-02-06 23:06:41 +01:00
parent 9c8e2b5af0
commit f7762e2730
5 changed files with 1102 additions and 0 deletions

View File

@ -979,6 +979,7 @@ SMBD_OBJ_SRV = smbd/server_reload.o \
smbd/smbXsrv_version.o \
smbd/smbXsrv_session.o \
smbd/smbXsrv_tcon.o \
smbd/smbXsrv_open.o \
$(MANGLE_OBJ) @VFS_STATIC@
SMBD_OBJ_BASE = $(PARAM_WITHOUT_REG_OBJ) $(SMBD_OBJ_SRV) $(LIBSMB_OBJ) \

View File

@ -356,6 +356,7 @@ struct smbXsrv_connection {
struct smbXsrv_session_table *session_table;
struct smbXsrv_tcon_table *tcon_table;
struct smbXsrv_open_table *open_table;
};
NTSTATUS smbXsrv_version_global_init(const struct server_id *server_id);
@ -407,6 +408,25 @@ NTSTATUS smb2srv_tcon_lookup(struct smbXsrv_session *session,
struct smbXsrv_tcon **tcon);
NTSTATUS smb2srv_tcon_disconnect_all(struct smbXsrv_session *session);
NTSTATUS smbXsrv_open_global_init(void);
NTSTATUS smbXsrv_open_create(struct smbXsrv_connection *conn,
struct auth_session_info *session_info,
NTTIME now,
struct smbXsrv_open **_open);
uint32_t smbXsrv_open_hash(struct smbXsrv_open *_open);
NTSTATUS smbXsrv_open_update(struct smbXsrv_open *_open);
NTSTATUS smbXsrv_open_close(struct smbXsrv_open *op, NTTIME now);
NTSTATUS smb1srv_open_table_init(struct smbXsrv_connection *conn);
NTSTATUS smb1srv_open_lookup(struct smbXsrv_connection *conn,
uint16_t fnum, NTTIME now,
struct smbXsrv_open **_open);
NTSTATUS smb2srv_open_table_init(struct smbXsrv_connection *conn);
NTSTATUS smb2srv_open_lookup(struct smbXsrv_connection *conn,
uint64_t persistent_id,
uint64_t volatile_id,
NTTIME now,
struct smbXsrv_open **_open);
struct smbd_smb2_request {
struct smbd_smb2_request *prev, *next;

View File

@ -1443,6 +1443,10 @@ extern void build_options(bool screen);
DEBUG(0, ("ERROR: file_init_global() failed\n"));
return -1;
}
status = smbXsrv_open_global_init();
if (!NT_STATUS_IS_OK(status)) {
exit(1);
}
/* This MUST be done before start_epmd() because otherwise
* start_epmd() forks and races against dcesrv_ep_setup() to

1075
source3/smbd/smbXsrv_open.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -378,6 +378,7 @@ SMBD_SRC_SRV = '''smbd/server_reload.c smbd/files.c smbd/connection.c
smbd/smbXsrv_version.c
smbd/smbXsrv_session.c
smbd/smbXsrv_tcon.c
smbd/smbXsrv_open.c
smbd/server_exit.c
${MANGLE_SRC}'''
@ -934,6 +935,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
LIBAFS_SETTOKEN
RPC_SERVER
NDR_SMBXSRV
ccan-hash
''',
private_library=True,
vars=locals())