(unsigned)rec.msg_type, rec.buf.length, num_fds,
server_id_str_buf(rec.src, &idbuf));
+ if (server_id_same_process(&rec.src, &msg_ctx->id)) {
+ DBG_DEBUG("Ignoring self-send\n");
+ goto close_fail;
+ }
+
messaging_dispatch_rec(msg_ctx, ev, &rec);
return;
const char *priv_path;
bool ok;
+ /*
+ * sec_init() *must* be called before any other
+ * functions that use sec_XXX(). e.g. sec_initial_uid().
+ */
+
+ sec_init();
+
lck_path = lock_path("msg.lock");
if (lck_path == NULL) {
return NT_STATUS_NO_MEMORY;
goto done;
}
- sec_init();
-
ctx->msg_dgm_ref = messaging_dgm_ref(ctx,
ctx->event_ctx,
&ctx->id.unique_id,