--- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -221,7 +221,7 @@ struct messaging_context *messaging_init return NULL; } - priv_path = private_path("msg.sock"); + priv_path = lock_path("msg.sock"); if (priv_path == NULL) { TALLOC_FREE(ctx); return NULL; @@ -393,6 +393,7 @@ struct server_id messaging_server_id(const struct messaging_context *msg_ctx) NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) { int ret; + char *lck_path; TALLOC_FREE(msg_ctx->msg_dgm_ref); @@ -400,9 +401,14 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) .pid = getpid(), .vnn = msg_ctx->id.vnn }; + lck_path = lock_path("msg.lock"); + if (lck_path == NULL) { + return NT_STATUS_NO_MEMORY; + } + msg_ctx->msg_dgm_ref = messaging_dgm_ref( msg_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id, - private_path("msg.sock"), lock_path("msg.lock"), + lock_path("msg.sock"), lck_path, messaging_recv_cb, msg_ctx, &ret); if (msg_ctx->msg_dgm_ref == NULL) { --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -323,7 +323,7 @@ struct imessaging_context *imessaging_in goto fail; } - msg->sock_dir = lpcfg_private_path(msg, lp_ctx, "msg.sock"); + msg->sock_dir = lpcfg_lock_path(msg, lp_ctx, "msg.sock"); if (msg->sock_dir == NULL) { goto fail; }