s3:lib/messages: use 'msg.lock' and 'msg.sock' for messaging related subdirs
authorStefan Metzmacher <metze@samba.org>
Wed, 16 Sep 2015 10:44:43 +0000 (12:44 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Sep 2015 04:03:17 +0000 (06:03 +0200)
In Samba 4.2, we used lock_path("msg") (with 0700) for the socket directory,
while we use lock_path("msg") (with 0755) for the lock file directory.

This generates a conflict that prevents samba, smbd, nmbd and winbindd
from starting after an upgrade.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11515

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/lib/messages.c

index 3527b3a4a640b374b863cbdcbd3510ac2bfe0631..07d1c83717c3ea0f319a1d6a38a2909de1d2c0c8 100644 (file)
@@ -306,7 +306,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
 
        sec_init();
 
-       lck_path = lock_path("msg");
+       lck_path = lock_path("msg.lock");
        if (lck_path == NULL) {
                TALLOC_FREE(ctx);
                return NULL;
@@ -321,7 +321,7 @@ struct messaging_context *messaging_init(TALLOC_CTX *mem_ctx,
                return NULL;
        }
 
-       priv_path = private_path("sock");
+       priv_path = private_path("msg.sock");
        if (priv_path == NULL) {
                TALLOC_FREE(ctx);
                return NULL;
@@ -399,7 +399,7 @@ NTSTATUS messaging_reinit(struct messaging_context *msg_ctx)
 
        msg_ctx->msg_dgm_ref = messaging_dgm_ref(
                msg_ctx, msg_ctx->event_ctx, msg_ctx->id.unique_id,
-               private_path("sock"), lock_path("msg"),
+               private_path("msg.sock"), lock_path("msg.lock"),
                messaging_recv_cb, msg_ctx, &ret);
 
        if (msg_ctx->msg_dgm_ref == NULL) {