From: Michael Tokarev Date: Tue, 26 Apr 2022 13:11:48 +0000 (+0300) Subject: move msg.sock from /var/lib/samba to /run/samba X-Git-Tag: archive/raspbian/2%4.22.0+dfsg-1+rpi1^2^2^2^2^2^2^2^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4731e551a7d8b044a558729ccc8c4c16df2f0664;p=samba.git move msg.sock from /var/lib/samba to /run/samba This moves a socket directory from /var/lib/samba to /run/samba. https://lists.samba.org/archive/samba-technical/2022-April/137322.html Gbp-Pq: Name move-msg.sock-from-var-lib-samba-to-run-samba.patch --- diff --git a/source3/lib/messages.c b/source3/lib/messages.c index b856a288..46b99cb1 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -462,11 +462,6 @@ static int messaging_context_destructor(struct messaging_context *ctx) return 0; } -static const char *private_path(const char *name) -{ - return talloc_asprintf(talloc_tos(), "%s/%s", lp_private_dir(), name); -} - static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct messaging_context **pmsg_ctx) @@ -501,7 +496,7 @@ static NTSTATUS messaging_init_internal(TALLOC_CTX *mem_ctx, return NT_STATUS_ACCESS_DENIED; } - priv_path = private_path("msg.sock"); + priv_path = lock_path(talloc_tos(), "msg.sock"); if (priv_path == NULL) { return NT_STATUS_NO_MEMORY; } @@ -664,7 +659,7 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx) msg_ctx->per_process_talloc_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id, - private_path("msg.sock"), + lock_path(talloc_tos(), "msg.sock"), lck_path, messaging_recv_cb, msg_ctx, diff --git a/source4/lib/messaging/messaging.c b/source4/lib/messaging/messaging.c index 8d76f173..6e500d0f 100644 --- a/source4/lib/messaging/messaging.c +++ b/source4/lib/messaging/messaging.c @@ -528,7 +528,7 @@ static struct imessaging_context *imessaging_init_internal( 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; }