summaryrefslogtreecommitdiffstats
path: root/debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 17:20:02 +0000
commit0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch)
tree2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch
parentAdding upstream version 2:4.20.0+dfsg. (diff)
downloadsamba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.tar.xz
samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.zip
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch')
-rw-r--r--debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch b/debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch
new file mode 100644
index 0000000..ceb2a4f
--- /dev/null
+++ b/debian/patches/move-msg.sock-from-var-lib-samba-to-run-samba.patch
@@ -0,0 +1,55 @@
+From: Michael Tokarev <mjt@tls.msk.ru>
+Date: Tue, 26 Apr 2022 16:11:48 +0300
+Subject: 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
+
+diff --git a/source3/lib/messages.c b/source3/lib/messages.c
+index 8641a9dad56..bf866e65e44 100644
+--- a/source3/lib/messages.c
++++ b/source3/lib/messages.c
+@@ -461,11 +461,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)
+@@ -500,7 +495,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;
+ }
+@@ -663,7 +658,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 a00c35be0d5..da641bc06aa 100644
+--- a/source4/lib/messaging/messaging.c
++++ b/source4/lib/messaging/messaging.c
+@@ -500,7 +500,7 @@ struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
+ 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;
+ }