summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/config.mk14
-rw-r--r--source4/smbd/process_model.c1
-rw-r--r--source4/smbd/process_model.mk13
-rw-r--r--source4/smbd/server.c3
-rw-r--r--source4/smbd/service_stream.c2
-rw-r--r--source4/smbd/service_stream.h6
6 files changed, 24 insertions, 15 deletions
diff --git a/source4/smbd/config.mk b/source4/smbd/config.mk
index 006135f818..e60f444456 100644
--- a/source4/smbd/config.mk
+++ b/source4/smbd/config.mk
@@ -1,19 +1,21 @@
# server subsystem
[SUBSYSTEM::service]
-PRIVATE_PROTO_HEADER = service_proto.h
PRIVATE_DEPENDENCIES = \
MESSAGING samba-socket
-service_OBJ_FILES = $(addprefix smbd/, \
+service_OBJ_FILES = $(addprefix $(smbdsrcdir)/, \
service.o \
service_stream.o \
service_task.o)
+$(eval $(call proto_header_template,$(smbdsrcdir)/service_proto.h,$(service_OBJ_FILES:.o=.c)))
+
[SUBSYSTEM::PIDFILE]
-PRIVATE_PROTO_HEADER = pidfile.h
-PIDFILE_OBJ_FILES = smbd/pidfile.o
+PIDFILE_OBJ_FILES = $(smbdsrcdir)/pidfile.o
+
+$(eval $(call proto_header_template,$(smbdsrcdir)/pidfile.h,$(PIDFILE_OBJ_FILES:.o=.c)))
#################################
# Start BINARY smbd
@@ -34,8 +36,8 @@ PRIVATE_DEPENDENCIES = \
share \
CLUSTER
-smbd_OBJ_FILES = smbd/server.o
+smbd_OBJ_FILES = $(smbdsrcdir)/server.o
-MANPAGES += smbd/smbd.8
+MANPAGES += $(smbdsrcdir)/smbd.8
# End BINARY smbd
#################################
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 2cb551a520..e631975b37 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -20,7 +20,6 @@
#include "includes.h"
#include "smbd/process_model.h"
-#include "build.h"
#include "param/param.h"
/*
diff --git a/source4/smbd/process_model.mk b/source4/smbd/process_model.mk
index 48899078f7..5ed8471a9d 100644
--- a/source4/smbd/process_model.mk
+++ b/source4/smbd/process_model.mk
@@ -8,7 +8,7 @@ SUBSYSTEM = process_model
# End MODULE process_model_single
################################################
-process_model_single_OBJ_FILES = smbd/process_single.o
+process_model_single_OBJ_FILES = $(smbdsrcdir)/process_single.o
################################################
# Start MODULE process_model_standard
@@ -19,7 +19,7 @@ PRIVATE_DEPENDENCIES = SETPROCTITLE
# End MODULE process_model_standard
################################################
-process_model_standard_OBJ_FILES = smbd/process_standard.o
+process_model_standard_OBJ_FILES = $(smbdsrcdir)/process_standard.o
################################################
# Start MODULE process_model_thread
@@ -30,7 +30,7 @@ PRIVATE_DEPENDENCIES = PTHREAD
# End MODULE process_model_thread
################################################
-process_model_thread_OBJ_FILES = smbd/process_thread.o
+process_model_thread_OBJ_FILES = $(smbdsrcdir)/process_thread.o
################################################
# Start MODULE process_model_prefork
@@ -40,10 +40,11 @@ SUBSYSTEM = process_model
# End MODULE process_model_thread
################################################
-process_model_prefork_OBJ_FILES = smbd/process_prefork.o
+process_model_prefork_OBJ_FILES = $(smbdsrcdir)/process_prefork.o
[SUBSYSTEM::process_model]
-PRIVATE_PROTO_HEADER = process_model_proto.h
PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBSAMBA-HOSTCONFIG
-process_model_OBJ_FILES = smbd/process_model.o
+process_model_OBJ_FILES = $(smbdsrcdir)/process_model.o
+
+$(eval $(call proto_header_template,$(smbdsrcdir)/process_model_proto.h,$(process_model_OBJ_FILES:.o=.c)))
diff --git a/source4/smbd/server.c b/source4/smbd/server.c
index 3f6cb48013..e1ebd133ce 100644
--- a/source4/smbd/server.c
+++ b/source4/smbd/server.c
@@ -28,7 +28,6 @@
#include "lib/cmdline/popt_common.h"
#include "system/dir.h"
#include "system/filesys.h"
-#include "build.h"
#include "ldb/include/ldb.h"
#include "registry/registry.h"
#include "ntvfs/ntvfs.h"
@@ -199,7 +198,7 @@ static int binary_smbd_main(const char *binary_name, int argc, const char *argv[
extern NTSTATUS server_service_smb_init(void);
extern NTSTATUS server_service_drepl_init(void);
extern NTSTATUS server_service_rpc_init(void);
- init_module_fn static_init[] = { STATIC_service_MODULES };
+ init_module_fn static_init[] = { STATIC_smbd_MODULES };
init_module_fn *shared_init;
struct event_context *event_ctx;
NTSTATUS status;
diff --git a/source4/smbd/service_stream.c b/source4/smbd/service_stream.c
index 9f744efa81..e27d87ec75 100644
--- a/source4/smbd/service_stream.c
+++ b/source4/smbd/service_stream.c
@@ -119,6 +119,7 @@ void stream_io_handler_callback(void *private, uint16_t flags)
a server connection
*/
NTSTATUS stream_new_connection_merge(struct event_context *ev,
+ struct loadparm_context *lp_ctx,
const struct model_ops *model_ops,
struct socket_context *sock,
const struct stream_server_ops *stream_ops,
@@ -140,6 +141,7 @@ NTSTATUS stream_new_connection_merge(struct event_context *ev,
srv_conn->ops = stream_ops;
srv_conn->msg_ctx = msg_ctx;
srv_conn->event.ctx = ev;
+ srv_conn->lp_ctx = lp_ctx;
srv_conn->event.fde = event_add_fd(ev, srv_conn, socket_get_fd(sock),
EVENT_FD_READ,
stream_io_handler_fde, srv_conn);
diff --git a/source4/smbd/service_stream.h b/source4/smbd/service_stream.h
index 04d23a56f2..d57a54cdc9 100644
--- a/source4/smbd/service_stream.h
+++ b/source4/smbd/service_stream.h
@@ -50,6 +50,12 @@ struct stream_connection {
struct messaging_context *msg_ctx;
struct loadparm_context *lp_ctx;
+ /*
+ * this transport layer session info, normally NULL
+ * which means the same as an anonymous session info
+ */
+ struct auth_session_info *session_info;
+
bool processing;
const char *terminate;
};