summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/rpc_server/rpc_ep_setup.c22
-rw-r--r--source3/smbd/server.c2
2 files changed, 17 insertions, 7 deletions
diff --git a/source3/rpc_server/rpc_ep_setup.c b/source3/rpc_server/rpc_ep_setup.c
index a0c54c7e99..d517bb8851 100644
--- a/source3/rpc_server/rpc_ep_setup.c
+++ b/source3/rpc_server/rpc_ep_setup.c
@@ -1103,14 +1103,24 @@ bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
return false;
}
- spoolss_cb.init = spoolss_init_cb;
- spoolss_cb.shutdown = spoolss_shutdown_cb;
- spoolss_cb.private_data = ep_ctx;
- if (!NT_STATUS_IS_OK(rpc_spoolss_init(&spoolss_cb))) {
- return false;
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server",
+ "spoolss",
+ "embedded");
+ if (StrCaseCmp(rpcsrv_type, "embedded") == 0) {
+ spoolss_cb.init = spoolss_init_cb;
+ spoolss_cb.shutdown = spoolss_shutdown_cb;
+ spoolss_cb.private_data = ep_ctx;
+ if (!NT_STATUS_IS_OK(rpc_spoolss_init(&spoolss_cb))) {
+ return false;
+ }
+ } else if (StrCaseCmp(rpcsrv_type, "daemon") == 0 ||
+ StrCaseCmp(rpcsrv_type, "external") == 0) {
+ if (!NT_STATUS_IS_OK(rpc_spoolss_init(NULL))) {
+ return false;
+ }
}
-
svcctl_cb.init = svcctl_init_cb;
svcctl_cb.shutdown = svcctl_shutdown_cb;
svcctl_cb.private_data = ep_ctx;
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 4b7637f89e..8c7b146e19 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -1253,7 +1253,7 @@ extern void build_options(bool screen);
rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
"rpc_server", "spoolss",
"embedded");
- if (StrCaseCmp(rpcsrv_type, "embedded") != 0) {
+ if (StrCaseCmp(rpcsrv_type, "daemon") == 0) {
start_spoolssd(smbd_event_context(),
smbd_messaging_context());
}