summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-08-02 10:59:05 +0200
committerSimo Sorce <idra@samba.org>2011-08-21 09:05:02 -0400
commit7b715f15b198def34278eec558ff9cf29bb28a6d (patch)
tree09e3450126a8f1cb3d7600ca86949d774a9c196f /source3
parent7abdf6e57f5fc6d2c9ccd255991aea6fb093388b (diff)
downloadsamba-7b715f15b198def34278eec558ff9cf29bb28a6d.tar.gz
samba-7b715f15b198def34278eec558ff9cf29bb28a6d.tar.bz2
samba-7b715f15b198def34278eec558ff9cf29bb28a6d.zip
s3-smbd: Start lsasd as deamon.
Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: Simo Sorce <idra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/server.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index a9762e0b52..f6d2657289 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -42,6 +42,9 @@
extern void start_epmd(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx);
+extern void start_lsasd(struct event_context *ev_ctx,
+ struct messaging_context *msg_ctx);
+
#ifdef WITH_DFS
extern int dcelogin_atmost_once;
#endif /* WITH_DFS */
@@ -1221,11 +1224,19 @@ extern void build_options(bool screen);
/* only start other daemons if we are running as a daemon
* -- bad things will happen if smbd is launched via inetd
* and we fork a copy of ourselves here */
- if (is_daemon && !interactive && !_lp_disable_spoolss()) {
- bool bgq = lp_parm_bool(-1, "smbd", "backgroundqueue", true);
+ if (is_daemon && !interactive) {
+ enum rpc_service_mode_e lsarpc_mode = rpc_lsarpc_mode();
- if (!printing_subsystem_init(ev_ctx, msg_ctx, true, bgq)) {
- exit(1);
+ if (lsarpc_mode == RPC_SERVICE_MODE_DAEMON) {
+ start_lsasd(ev_ctx, msg_ctx);
+ }
+
+ if (!_lp_disable_spoolss()) {
+ bool bgq = lp_parm_bool(-1, "smbd", "backgroundqueue", true);
+
+ if (!printing_subsystem_init(ev_ctx, msg_ctx, true, bgq)) {
+ exit(1);
+ }
}
} else if (!_lp_disable_spoolss()) {
if (!printing_subsystem_init(ev_ctx, msg_ctx, false, false)) {