messaging_register(msg_ctx, ev_ctx,
MSG_PREFORK_PARENT_EVENT, parent_ping);
- ok = init_rpc_module("mdssvc", NULL);
+ ok = setup_rpc_module(ev_ctx, msg_ctx, "mdssvc");
if (!ok) {
DBG_ERR("Failed to initialize mdssvc module\n");
return false;
messaging_register(msg_ctx, ev_ctx,
MSG_PREFORK_CHILD_EVENT, child_ping);
- ok = setup_rpc_module(ev_ctx, msg_ctx, "mdssvc");
- if (!ok) {
- exit(1);
- }
-
ok = mdssd_setup_children_monitor(ev_ctx, msg_ctx);
if (!ok) {
exit(1);
#include "libcli/security/dom_sid.h"
#include "gen_ndr/auth.h"
#include "mdssvc.h"
+#include "smbd/globals.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
enum rpc_daemon_type_e mdssvc_type = rpc_mdssd_daemon();
bool external = service_mode != RPC_SERVICE_MODE_EMBEDDED ||
mdssvc_type != RPC_DAEMON_EMBEDDED;
+ bool in_mdssd = external && am_parent == NULL;
+
+ if (external && !in_mdssd) {
+ return true;
+ }
mdssvc_cb.init = mdssvc_init_cb;
mdssvc_cb.shutdown = mdssvc_shutdown_cb;