summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_config.c2
-rw-r--r--source3/rpc_server/rpc_config.h3
-rw-r--r--source3/rpc_server/rpc_service_setup.c21
3 files changed, 16 insertions, 10 deletions
diff --git a/source3/rpc_server/rpc_config.c b/source3/rpc_server/rpc_config.c
index a706a11cea..76df479cf4 100644
--- a/source3/rpc_server/rpc_config.c
+++ b/source3/rpc_server/rpc_config.c
@@ -60,8 +60,6 @@ enum rpc_service_mode_e rpc_service_mode(const char *name)
state = RPC_SERVICE_MODE_EMBEDDED;
} else if (strcasecmp_m(rpcsrv_type, "external") == 0) {
state = RPC_SERVICE_MODE_EXTERNAL;
- } else if (strcasecmp(rpcsrv_type, "daemon") == 0) {
- state = RPC_SERVICE_MODE_DAEMON;
} else {
state = RPC_SERVICE_MODE_DISABLED;
}
diff --git a/source3/rpc_server/rpc_config.h b/source3/rpc_server/rpc_config.h
index 4d85d59590..d1c26dd366 100644
--- a/source3/rpc_server/rpc_config.h
+++ b/source3/rpc_server/rpc_config.h
@@ -26,8 +26,7 @@
enum rpc_service_mode_e {
RPC_SERVICE_MODE_DISABLED = 0,
RPC_SERVICE_MODE_EMBEDDED,
- RPC_SERVICE_MODE_EXTERNAL,
- RPC_SERVICE_MODE_DAEMON
+ RPC_SERVICE_MODE_EXTERNAL
};
/**
diff --git a/source3/rpc_server/rpc_service_setup.c b/source3/rpc_server/rpc_service_setup.c
index 1314d111fe..29d7bf238a 100644
--- a/source3/rpc_server/rpc_service_setup.c
+++ b/source3/rpc_server/rpc_service_setup.c
@@ -57,9 +57,11 @@ static bool rpc_setup_epmapper(struct tevent_context *ev_ctx,
struct messaging_context *msg_ctx)
{
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
+ enum rpc_daemon_type_e epm_type = rpc_epmapper_daemon();
NTSTATUS status;
- if (epm_mode != RPC_SERVICE_MODE_DISABLED) {
+ if (epm_mode != RPC_SERVICE_MODE_DISABLED &&
+ epm_type != RPC_DAEMON_DISABLED) {
status = rpc_epmapper_init(NULL);
if (!NT_STATUS_IS_OK(status)) {
return false;
@@ -192,6 +194,7 @@ static bool rpc_setup_lsarpc(struct tevent_context *ev_ctx,
struct dcerpc_binding_vector *v2;
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
enum rpc_service_mode_e lsarpc_mode = rpc_lsarpc_mode();
+ enum rpc_daemon_type_e lsasd_type = rpc_lsasd_daemon();
NTSTATUS status;
bool ok;
@@ -201,6 +204,7 @@ static bool rpc_setup_lsarpc(struct tevent_context *ev_ctx,
}
if (lsarpc_mode == RPC_SERVICE_MODE_EMBEDDED &&
+ lsasd_type != RPC_DAEMON_DISABLED &&
epm_mode != RPC_SERVICE_MODE_DISABLED) {
v2 = dcerpc_binding_vector_dup(talloc_tos(), v);
if (v2 == NULL) {
@@ -251,6 +255,7 @@ static bool rpc_setup_samr(struct tevent_context *ev_ctx,
struct dcerpc_binding_vector *v2;
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
enum rpc_service_mode_e samr_mode = rpc_samr_mode();
+ enum rpc_daemon_type_e lsasd_type = rpc_lsasd_daemon();
NTSTATUS status;
bool ok;
@@ -260,6 +265,7 @@ static bool rpc_setup_samr(struct tevent_context *ev_ctx,
}
if (samr_mode == RPC_SERVICE_MODE_EMBEDDED &&
+ lsasd_type != RPC_DAEMON_DISABLED &&
epm_mode != RPC_SERVICE_MODE_DISABLED) {
v2 = dcerpc_binding_vector_dup(talloc_tos(), v);
if (v2 == NULL) {
@@ -310,6 +316,7 @@ static bool rpc_setup_netlogon(struct tevent_context *ev_ctx,
struct dcerpc_binding_vector *v2;
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
enum rpc_service_mode_e netlogon_mode = rpc_netlogon_mode();
+ enum rpc_daemon_type_e lsasd_type = rpc_lsasd_daemon();
NTSTATUS status;
bool ok;
@@ -319,6 +326,7 @@ static bool rpc_setup_netlogon(struct tevent_context *ev_ctx,
}
if (netlogon_mode == RPC_SERVICE_MODE_EMBEDDED &&
+ lsasd_type != RPC_DAEMON_DISABLED &&
epm_mode != RPC_SERVICE_MODE_DISABLED) {
v2 = dcerpc_binding_vector_dup(talloc_tos(), v);
if (v2 == NULL) {
@@ -621,28 +629,29 @@ static bool rpc_setup_spoolss(struct tevent_context *ev_ctx,
struct rpc_srv_callbacks spoolss_cb;
struct dcerpc_binding_vector *v;
enum rpc_service_mode_e spoolss_mode = rpc_spoolss_mode();
- NTSTATUS status;
+ enum rpc_daemon_type_e spoolss_type = rpc_spoolss_daemon();
+ NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
if (_lp_disable_spoolss() ||
+ spoolss_type == RPC_DAEMON_DISABLED ||
spoolss_mode == RPC_SERVICE_MODE_DISABLED) {
return true;
}
- if (spoolss_mode == RPC_SERVICE_MODE_EMBEDDED) {
+ if (spoolss_type == RPC_DAEMON_EMBEDDED) {
spoolss_cb.init = spoolss_init_cb;
spoolss_cb.shutdown = spoolss_shutdown_cb;
spoolss_cb.private_data = msg_ctx;
status = rpc_spoolss_init(&spoolss_cb);
- } else if (spoolss_mode == RPC_SERVICE_MODE_EXTERNAL ||
- spoolss_mode == RPC_SERVICE_MODE_DAEMON) {
+ } else if (spoolss_type == RPC_DAEMON_FORK) {
status = rpc_spoolss_init(NULL);
}
if (!NT_STATUS_IS_OK(status)) {
return false;
}
- if (spoolss_mode == RPC_SERVICE_MODE_EMBEDDED) {
+ if (spoolss_type == RPC_DAEMON_EMBEDDED) {
enum rpc_service_mode_e epm_mode = rpc_epmapper_mode();
if (epm_mode != RPC_SERVICE_MODE_DISABLED) {