summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_rpc_register.c30
-rwxr-xr-xsource3/script/tests/selftest.sh2
2 files changed, 30 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_rpc_register.c b/source3/rpc_server/srv_rpc_register.c
index b3e563dd3b..73e2dc766d 100644
--- a/source3/rpc_server/srv_rpc_register.c
+++ b/source3/rpc_server/srv_rpc_register.c
@@ -48,6 +48,15 @@ static NTSTATUS _rpc_ep_register(const struct ndr_interface_table *iface,
{
struct dcerpc_binding_vector *v = NULL;
NTSTATUS status;
+ const char *rpcsrv_type;
+
+ /* start endpoint mapper only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (StrCaseCmp(rpcsrv_type, "none") == 0) {
+ return NT_STATUS_OK;
+ }
status = dcerpc_binding_vector_create(talloc_tos(),
iface,
@@ -71,6 +80,15 @@ static NTSTATUS _rpc_ep_unregister(const struct ndr_interface_table *iface)
{
struct dcerpc_binding_vector *v = NULL;
NTSTATUS status;
+ const char *rpcsrv_type;
+
+ /* start endpoint mapper only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (StrCaseCmp(rpcsrv_type, "none") == 0) {
+ return NT_STATUS_OK;
+ }
status = dcerpc_binding_vector_create(talloc_tos(),
iface,
@@ -265,8 +283,16 @@ bool srv_rpc_register(struct messaging_context *msg_ctx) {
struct rpc_srv_callbacks dssetup_cb;
struct rpc_srv_callbacks wkssvc_cb;
- if (!NT_STATUS_IS_OK(rpc_epmapper_init(NULL))) {
- return false;
+ const char *rpcsrv_type;
+
+ /* start endpoint mapper only if enabled */
+ rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
+ "rpc_server", "epmapper",
+ "none");
+ if (StrCaseCmp(rpcsrv_type, "embedded") == 0) {
+ if (!NT_STATUS_IS_OK(rpc_epmapper_init(NULL))) {
+ return false;
+ }
}
winreg_cb.init = winreg_init_cb;
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 17bb5fe41a..3da4fac8ff 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -343,6 +343,8 @@ cat >$SERVERCONFFILE<<EOF
queue resume command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb queueresume %p
lpq cache time = 0
+ rpc_server:epmapper = embedded
+
#Include user defined custom parameters if set
$INCLUDE_CUSTOM_CONF