}
void start_epmd(struct tevent_context *ev_ctx,
- struct messaging_context *msg_ctx)
+ struct messaging_context *msg_ctx,
+ struct dcesrv_context *dce_ctx)
{
struct rpc_srv_callbacks epmapper_cb;
NTSTATUS status;
exit(1);
}
+ DBG_INFO("Reinitializing DCE/RPC server context\n");
+
+ status = dcesrv_reinit_context(dce_ctx);
+ if (!NT_STATUS_IS_OK(status)) {
+ DBG_ERR("Failed to reinit DCE/RPC context: %s\n",
+ nt_errstr(status));
+ exit(1);
+ }
+
status = rpc_epmapper_init(&epmapper_cb);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Failed to register epmd rpc interface! (%s)\n",
#include "replace.h"
#include "messages.h"
+struct dcesrv_context;
+
void start_epmd(struct tevent_context *ev_ctx,
- struct messaging_context *msg_ctx);
+ struct messaging_context *msg_ctx,
+ struct dcesrv_context *dce_ctx);
#endif
return -1;
}
- if (is_daemon && !interactive) {
- if (rpc_epmapper_daemon() == RPC_DAEMON_FORK) {
- start_epmd(ev_ctx, msg_ctx);
- }
- }
-
status = dcesrv_init(ev_ctx, ev_ctx, msg_ctx, dce_ctx);
if (!NT_STATUS_IS_OK(status)) {
DBG_ERR("Failed to setup RPC server: %s\n", nt_errstr(status));
* and we fork a copy of ourselves here */
if (is_daemon && !interactive) {
+ if (rpc_epmapper_daemon() == RPC_DAEMON_FORK) {
+ start_epmd(ev_ctx, msg_ctx, dce_ctx);
+ }
+
if (rpc_lsasd_daemon() == RPC_DAEMON_FORK) {
start_lsasd(ev_ctx, msg_ctx);
}