The branch, master has been updated
       via  3194a4d lib: Remove unused serverid_get_random_unique_id
       via  22b320c lib: Add some debug to dgm_ref
       via  01d7e26 lib: Push down unique generation one level
       via  a788fd3 lib: Remove unused global my_unique_id
       via  62f2b86 lib: Remove unused procid_is_me()
       via  da88b0d lib: Remove unused procid_self()
       via  6eb6622 lib: Remove procid_self() from messages.c
       via  b9fd6e2 lib: Fix pid_to_procid()
       via  ad924ab winbindd: Remove reference to procid_self()
       via  bcc1521 fssd: Remove reference to procid_self()
       via  46308bb auth: Remove procid_self() from auth_samba4
      from  7c48369 smbd: Fix file name buflen and padding in notify repsonse

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 3194a4d342605a0a21f4bda55cd43c6eb983f941
Author: Volker Lendecke <[email protected]>
Date:   Wed Oct 14 11:41:23 2015 +0200

    lib: Remove unused serverid_get_random_unique_id
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>
    
    Autobuild-User(master): Volker Lendecke <[email protected]>
    Autobuild-Date(master): Mon Oct 19 15:12:22 CEST 2015 on sn-devel-104

commit 22b320caa02ea000314d9ff0c3c7fd8c6b9c4318
Author: Volker Lendecke <[email protected]>
Date:   Wed Oct 14 11:31:07 2015 +0200

    lib: Add some debug to dgm_ref
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 01d7e26f7faa82da55aa66af28c5b224c7caa792
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 21:30:30 2015 +0200

    lib: Push down unique generation one level
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit a788fd306580952d83007319fca12635e431354c
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 20:59:57 2015 +0200

    lib: Remove unused global my_unique_id
    
    The unique_id is now always attached to a messaging_context.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 62f2b86f4fd262c1b299f8c7713e918f4e9a3be1
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 17:37:14 2015 +0200

    lib: Remove unused procid_is_me()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit da88b0da6694936c2ea79ac59c4f902d6c5ffce0
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 17:28:14 2015 +0200

    lib: Remove unused procid_self()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 6eb6622c13f74fd68ce0fe3fe9623bc967d3ce01
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 17:26:34 2015 +0200

    lib: Remove procid_self() from messages.c
    
    This together with the removal of procid_self obsoletes the global
    my_unique.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit b9fd6e24847826bf948041ed56bfd8767ec5db78
Author: Volker Lendecke <[email protected]>
Date:   Fri Oct 16 11:36:48 2015 +0200

    lib: Fix pid_to_procid()
    
    Putting in my_unique_id is just wrong. Now that we have
    a cheap way to read everyone's unique ids out of the lockfile,
    we can fix it.
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit ad924ab859f648587515304cde7054a1bf91b8a3
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 17:21:55 2015 +0200

    winbindd: Remove reference to procid_self()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit bcc152166286b5d3c4c23d055482865da86ee07a
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 17:21:30 2015 +0200

    fssd: Remove reference to procid_self()
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 46308bb2a6729dbf6ad913bd1cfab18827c62835
Author: Volker Lendecke <[email protected]>
Date:   Mon Oct 12 17:20:48 2015 +0200

    auth: Remove procid_self() from auth_samba4
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 source3/auth/auth_samba4.c        |  9 ++++++++-
 source3/include/proto.h           |  3 ---
 source3/include/serverid.h        |  6 ------
 source3/lib/messages.c            | 13 +++++++++----
 source3/lib/messages_dgm.c        | 22 +++++++++++++++++++---
 source3/lib/messages_dgm.h        |  2 +-
 source3/lib/messages_dgm_ref.c    | 18 +++++++++++++++++-
 source3/lib/messages_dgm_ref.h    |  2 +-
 source3/lib/serverid.c            | 12 ------------
 source3/lib/util.c                | 37 ++++++++++---------------------------
 source3/rpc_server/fssd.c         |  2 +-
 source3/smbd/scavenger.c          |  5 -----
 source3/smbd/server.c             | 11 -----------
 source3/winbindd/winbindd.c       | 11 ++++++++++-
 source3/wscript_build             |  3 ++-
 source4/lib/messaging/messaging.c |  2 +-
 16 files changed, 79 insertions(+), 79 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_samba4.c b/source3/auth/auth_samba4.c
index 0a80d17..e68c702 100644
--- a/source3/auth/auth_samba4.c
+++ b/source3/auth/auth_samba4.c
@@ -20,6 +20,7 @@
 
 #include "includes.h"
 #include "source3/include/auth.h"
+#include "source3/include/messages.h"
 #include "source4/auth/auth.h"
 #include "auth/auth_sam_reply.h"
 #include "param/param.h"
@@ -48,6 +49,7 @@ static int free_task_id(struct server_id *server_id)
  * (ie, use talloc_free()) */
 static struct server_id *new_server_id_task(TALLOC_CTX *mem_ctx)
 {
+       struct messaging_context *msg_ctx;
        struct server_id *server_id;
        int task_id;
        if (!task_id_tree) {
@@ -57,12 +59,17 @@ static struct server_id *new_server_id_task(TALLOC_CTX 
*mem_ctx)
                }
        }
 
+       msg_ctx = server_messaging_context();
+       if (msg_ctx == NULL) {
+               return NULL;
+       }
+
        server_id = talloc(mem_ctx, struct server_id);
 
        if (!server_id) {
                return NULL;
        }
-       *server_id = procid_self();
+       *server_id = messaging_server_id(msg_ctx);
 
        /* 0 is the default server_id, so we need to start with 1 */
        task_id = idr_get_new_above(task_id_tree, server_id, 1, INT32_MAX);
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 5b63897..c2d9166 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -436,11 +436,8 @@ uint32_t map_share_mode_to_deny_mode(uint32_t 
share_access, uint32_t private_opt
 pid_t procid_to_pid(const struct server_id *proc);
 void set_my_vnn(uint32_t vnn);
 uint32_t get_my_vnn(void);
-void set_my_unique_id(uint64_t unique_id);
 struct server_id pid_to_procid(pid_t pid);
-struct server_id procid_self(void);
 #define serverid_equal(p1, p2) server_id_equal(p1,p2)
-bool procid_is_me(const struct server_id *pid);
 struct server_id interpret_pid(const char *pid_string);
 bool procid_valid(const struct server_id *pid);
 bool procid_is_local(const struct server_id *pid);
diff --git a/source3/include/serverid.h b/source3/include/serverid.h
index 24ebcbe..03022dc 100644
--- a/source3/include/serverid.h
+++ b/source3/include/serverid.h
@@ -59,10 +59,4 @@ bool serverid_traverse_read(int (*fn)(const struct server_id 
*id,
  */
 bool serverid_parent_init(TALLOC_CTX *mem_ctx);
 
-/*
- * Get a random unique_id and make sure that it is not
- * SERVERID_UNIQUE_ID_NOT_TO_VERIFY
- */
-uint64_t serverid_get_random_unique_id(void);
-
 #endif
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index d059f23..ef8e83d 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -300,7 +300,10 @@ struct messaging_context *messaging_init(TALLOC_CTX 
*mem_ctx,
                return NULL;
        }
 
-       ctx->id = procid_self();
+       ctx->id = (struct server_id) {
+               .pid = getpid(), .vnn = NONCLUSTER_VNN
+       };
+
        ctx->event_ctx = ev;
 
        sec_init();
@@ -336,7 +339,7 @@ struct messaging_context *messaging_init(TALLOC_CTX 
*mem_ctx,
        }
 
        ctx->msg_dgm_ref = messaging_dgm_ref(
-               ctx, ctx->event_ctx, ctx->id.unique_id,
+               ctx, ctx->event_ctx, &ctx->id.unique_id,
                priv_path, lck_path, messaging_recv_cb, ctx, &ret);
 
        if (ctx->msg_dgm_ref == NULL) {
@@ -393,10 +396,12 @@ NTSTATUS messaging_reinit(struct messaging_context 
*msg_ctx)
 
        TALLOC_FREE(msg_ctx->msg_dgm_ref);
 
-       msg_ctx->id = procid_self();
+       msg_ctx->id = (struct server_id) {
+               .pid = getpid(), .vnn = msg_ctx->id.vnn
+       };
 
        msg_ctx->msg_dgm_ref = messaging_dgm_ref(
-               msg_ctx, msg_ctx->event_ctx, msg_ctx->id.unique_id,
+               msg_ctx, msg_ctx->event_ctx, &msg_ctx->id.unique_id,
                private_path("msg.sock"), lock_path("msg.lock"),
                messaging_recv_cb, msg_ctx, &ret);
 
diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c
index 1acd2d7..006e917 100644
--- a/source3/lib/messages_dgm.c
+++ b/source3/lib/messages_dgm.c
@@ -29,6 +29,7 @@
 #include "lib/param/param.h"
 #include "poll_funcs/poll_funcs_tevent.h"
 #include "unix_msg/unix_msg.h"
+#include "lib/util/genrand.h"
 
 struct sun_path_buf {
        /*
@@ -67,12 +68,13 @@ static int messaging_dgm_context_destructor(struct 
messaging_dgm_context *c);
 
 static int messaging_dgm_lockfile_create(struct messaging_dgm_context *ctx,
                                         pid_t pid, int *plockfile_fd,
-                                        uint64_t unique)
+                                        uint64_t *punique)
 {
        char buf[64];
        int lockfile_fd;
        struct sun_path_buf lockfile_name;
        struct flock lck;
+       uint64_t unique;
        int unique_len, ret;
        ssize_t written;
 
@@ -104,6 +106,19 @@ static int messaging_dgm_lockfile_create(struct 
messaging_dgm_context *ctx,
                goto fail_close;
        }
 
+       /*
+        * Directly using the binary value for
+        * SERVERID_UNIQUE_ID_NOT_TO_VERIFY is a layering
+        * violation. But including all of ndr here just for this
+        * seems to be a bit overkill to me. Also, messages_dgm might
+        * be replaced sooner or later by something streams-based,
+        * where unique_id generation will be handled differently.
+        */
+
+       do {
+               generate_random_buffer((uint8_t *)&unique, sizeof(unique));
+       } while (unique == UINT64_C(0xFFFFFFFFFFFFFFFF));
+
        unique_len = snprintf(buf, sizeof(buf), "%ju\n", (uintmax_t)unique);
 
        /* shorten a potentially preexisting file */
@@ -124,6 +139,7 @@ static int messaging_dgm_lockfile_create(struct 
messaging_dgm_context *ctx,
        }
 
        *plockfile_fd = lockfile_fd;
+       *punique = unique;
        return 0;
 
 fail_unlink:
@@ -134,7 +150,7 @@ fail_close:
 }
 
 int messaging_dgm_init(struct tevent_context *ev,
-                      uint64_t unique,
+                      uint64_t *punique,
                       const char *socket_dir,
                       const char *lockfile_dir,
                       void (*recv_cb)(const uint8_t *msg,
@@ -186,7 +202,7 @@ int messaging_dgm_init(struct tevent_context *ev,
        }
 
        ret = messaging_dgm_lockfile_create(ctx, ctx->pid, &ctx->lockfile_fd,
-                                           unique);
+                                           punique);
        if (ret != 0) {
                DEBUG(1, ("%s: messaging_dgm_create_lockfile failed: %s\n",
                          __func__, strerror(ret)));
diff --git a/source3/lib/messages_dgm.h b/source3/lib/messages_dgm.h
index d38cfcc..a9cbd81 100644
--- a/source3/lib/messages_dgm.h
+++ b/source3/lib/messages_dgm.h
@@ -25,7 +25,7 @@
 #include <tevent.h>
 
 int messaging_dgm_init(struct tevent_context *ev,
-                      uint64_t unique,
+                      uint64_t *unique,
                       const char *socket_dir,
                       const char *lockfile_dir,
                       void (*recv_cb)(const uint8_t *msg,
diff --git a/source3/lib/messages_dgm_ref.c b/source3/lib/messages_dgm_ref.c
index 0a6cbf7..e3b2d88 100644
--- a/source3/lib/messages_dgm_ref.c
+++ b/source3/lib/messages_dgm_ref.c
@@ -40,7 +40,7 @@ static void msg_dgm_ref_recv(const uint8_t *msg, size_t 
msg_len,
                             int *fds, size_t num_fds, void *private_data);
 
 void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                       uint64_t unique,
+                       uint64_t *unique,
                        const char *socket_dir,
                        const char *lockfile_dir,
                        void (*recv_cb)(const uint8_t *msg, size_t msg_len,
@@ -73,6 +73,8 @@ void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct 
tevent_context *ev,
 
                ret = messaging_dgm_init(ev, unique, socket_dir, lockfile_dir,
                                         msg_dgm_ref_recv, NULL);
+               DBG_DEBUG("%s: messaging_dgm_init returned %s\n", __func__,
+                         strerror(ret));
                if (ret != 0) {
                        DEBUG(10, ("messaging_dgm_init failed: %s\n",
                                   strerror(ret)));
@@ -82,6 +84,16 @@ void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct 
tevent_context *ev,
                }
                dgm_pid = getpid();
        } else {
+               int ret;
+               ret = messaging_dgm_get_unique(getpid(), unique);
+               DBG_DEBUG("%s: messaging_dgm_get_unique returned %s\n",
+                         __func__, strerror(ret));
+               if (ret != 0) {
+                       TALLOC_FREE(result);
+                       *err = ret;
+                       return NULL;
+               }
+
                result->tevent_handle = messaging_dgm_register_tevent_context(
                        result, ev);
                if (result->tevent_handle == NULL) {
@@ -91,6 +103,8 @@ void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct 
tevent_context *ev,
                }
        }
 
+       DBG_DEBUG("%s: unique = %"PRIu64"\n", __func__, *unique);
+
        refs = tmp_refs;
 
        result->recv_cb = recv_cb;
@@ -126,6 +140,8 @@ static int msg_dgm_ref_destructor(struct msg_dgm_ref *r)
 
        TALLOC_FREE(r->tevent_handle);
 
+       DBG_DEBUG("%s: refs=%p\n", __func__, refs);
+
        if (refs == NULL) {
                messaging_dgm_destroy();
        }
diff --git a/source3/lib/messages_dgm_ref.h b/source3/lib/messages_dgm_ref.h
index 3df0c06..8f0aff8 100644
--- a/source3/lib/messages_dgm_ref.h
+++ b/source3/lib/messages_dgm_ref.h
@@ -25,7 +25,7 @@
 #include "replace.h"
 
 void *messaging_dgm_ref(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                       uint64_t unique,
+                       uint64_t *unique,
                        const char *socket_dir,
                        const char *lockfile_dir,
                        void (*recv_cb)(const uint8_t *msg, size_t msg_len,
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index c219d21..5c2fa65 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -313,15 +313,3 @@ bool serverid_traverse(int (*fn)(struct db_record *rec,
        status = dbwrap_traverse(db, serverid_traverse_fn, &state, NULL);
        return NT_STATUS_IS_OK(status);
 }
-
-uint64_t serverid_get_random_unique_id(void)
-{
-       uint64_t unique_id = SERVERID_UNIQUE_ID_NOT_TO_VERIFY;
-
-       while (unique_id == SERVERID_UNIQUE_ID_NOT_TO_VERIFY) {
-               generate_random_buffer((uint8_t *)&unique_id,
-                                      sizeof(unique_id));
-       }
-
-       return unique_id;
-}
diff --git a/source3/lib/util.c b/source3/lib/util.c
index a0da087..7c24f8a 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -28,6 +28,7 @@
 #include "ctdbd_conn.h"
 #include "../lib/util/util_pw.h"
 #include "messages.h"
+#include "messages_dgm.h"
 #include "libcli/security/security.h"
 #include "serverid.h"
 #include "lib/util/sys_rw.h"
@@ -1959,37 +1960,19 @@ uint32_t get_my_vnn(void)
        return my_vnn;
 }
 
-static uint64_t my_unique_id = 0;
-
-void set_my_unique_id(uint64_t unique_id)
-{
-       my_unique_id = unique_id;
-}
-
 struct server_id pid_to_procid(pid_t pid)
 {
-       struct server_id result;
-       result.pid = pid;
-       result.task_id = 0;
-       result.unique_id = my_unique_id;
-       result.vnn = my_vnn;
-       return result;
-}
+       uint64_t unique = 0;
+       int ret;
 
-struct server_id procid_self(void)
-{
-       return pid_to_procid(getpid());
-}
+       ret = messaging_dgm_get_unique(pid, &unique);
+       if (ret != 0) {
+               DBG_WARNING("%s: messaging_dgm_get_unique failed: %s\n",
+                           __func__, strerror(ret));
+       }
 
-bool procid_is_me(const struct server_id *pid)
-{
-       if (pid->pid != getpid())
-               return False;
-       if (pid->task_id != 0)
-               return False;
-       if (pid->vnn != my_vnn)
-               return False;
-       return True;
+       return (struct server_id) {
+               .pid = pid, .unique_id = unique, .vnn = my_vnn };
 }
 
 struct server_id interpret_pid(const char *pid_string)
diff --git a/source3/rpc_server/fssd.c b/source3/rpc_server/fssd.c
index 1e96afe..8f55aff 100644
--- a/source3/rpc_server/fssd.c
+++ b/source3/rpc_server/fssd.c
@@ -182,7 +182,7 @@ void start_fssd(struct tevent_context *ev_ctx,
        fssd_setup_sig_term_handler(ev_ctx);
        fssd_setup_sig_hup_handler(ev_ctx, msg_ctx);
 
-       ok = serverid_register(procid_self(),
+       ok = serverid_register(messaging_server_id(msg_ctx),
                               FLAG_MSG_GENERAL |
                               FLAG_MSG_PRINT_GENERAL);
        if (!ok) {
diff --git a/source3/smbd/scavenger.c b/source3/smbd/scavenger.c
index ea0a894..6171c29 100644
--- a/source3/smbd/scavenger.c
+++ b/source3/smbd/scavenger.c
@@ -196,7 +196,6 @@ static bool smbd_scavenger_start(struct 
smbd_scavenger_state *state)
        struct tevent_fd *fde = NULL;
        int fds[2];
        int ret;
-       uint64_t unique_id;
        bool ok;
 
        SMB_ASSERT(server_id_equal(&state->parent_id, &self));
@@ -234,8 +233,6 @@ static bool smbd_scavenger_start(struct 
smbd_scavenger_state *state)
        smb_set_close_on_exec(fds[0]);
        smb_set_close_on_exec(fds[1]);
 
-       unique_id = serverid_get_random_unique_id();
-
        ret = fork();
        if (ret == -1) {
                int err = errno;
@@ -252,8 +249,6 @@ static bool smbd_scavenger_start(struct 
smbd_scavenger_state *state)
 
                close(fds[0]);
 
-               set_my_unique_id(unique_id);
-
                status = smbd_reinit_after_fork(state->msg, state->ev,
                                                true, "smbd-scavenger");
                if (!NT_STATUS_IS_OK(status)) {
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index ca9fb9e..ceb9599 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -575,7 +575,6 @@ static void smbd_accept_connection(struct tevent_context 
*ev,
        socklen_t in_addrlen = sizeof(addr);
        int fd;
        pid_t pid = 0;
-       uint64_t unique_id;
 
        fd = accept(s->fd, (struct sockaddr *)(void *)&addr,&in_addrlen);
        if (fd == -1 && errno == EINTR)
@@ -599,12 +598,6 @@ static void smbd_accept_connection(struct tevent_context 
*ev,
                return;
        }
 
-       /*
-        * Generate a unique id in the parent process so that we use
-        * the global random state in the parent.
-        */
-       unique_id = serverid_get_random_unique_id();
-
        pid = fork();
        if (pid == 0) {
                NTSTATUS status = NT_STATUS_OK;
@@ -616,8 +609,6 @@ static void smbd_accept_connection(struct tevent_context 
*ev,
                talloc_free(s->parent);
                s = NULL;
 
-               set_my_unique_id(unique_id);
-
                /* Stop zombies, the parent explicitly handles
                 * them, counting worker smbds. */
                CatchChild();
@@ -1363,8 +1354,6 @@ extern void build_options(bool screen);
                become_daemon(Fork, no_process_group, log_stdout);
        }
 
-        set_my_unique_id(serverid_get_random_unique_id());
-
 #if HAVE_SETPGID
        /*
         * If we're interactive we want to set our own process group for
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index e6dd0e7..d555127 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -99,12 +99,20 @@ struct messaging_context *winbind_messaging_context(void)
 struct imessaging_context *winbind_imessaging_context(void)
 {
        static struct imessaging_context *msg = NULL;
+       struct messaging_context *msg_ctx;
+       struct server_id myself;
        struct loadparm_context *lp_ctx;
 
        if (msg != NULL) {
                return msg;
        }
 
+       msg_ctx = server_messaging_context();
+       if (msg_ctx == NULL) {
+               smb_panic("server_messaging_context failed\n");
+       }
+       myself = messaging_server_id(msg_ctx);
+
        lp_ctx = loadparm_init_s3(NULL, loadparm_s3_helpers());
        if (lp_ctx == NULL) {
                smb_panic("Could not load smb.conf to init winbindd's 
imessaging context.\n");
@@ -114,7 +122,8 @@ struct imessaging_context *winbind_imessaging_context(void)
         * Note we MUST use the NULL context here, not the autofree context,
         * to avoid side effects in forked children exiting.
         */
-       msg = imessaging_init(NULL, lp_ctx, procid_self(), 
winbind_event_context(), false);
+       msg = imessaging_init(NULL, lp_ctx, myself, winbind_event_context(),
+                             false);
        talloc_unlink(NULL, lp_ctx);
 
        if (msg == NULL) {
diff --git a/source3/wscript_build b/source3/wscript_build
index be0b7e6..1f9f757 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -299,7 +299,8 @@ bld.SAMBA3_SUBSYSTEM('TDB_LIB',
 
 bld.SAMBA3_LIBRARY('messages_dgm',
                    source='''lib/messages_dgm.c lib/messages_dgm_ref.c''',
-                   deps='talloc UNIX_MSG POLL_FUNCS_TEVENT samba-debug',
+                   deps='''talloc UNIX_MSG POLL_FUNCS_TEVENT samba-debug
+                           genrand''',
                    private_library=True)
 
 bld.SAMBA3_LIBRARY('messages_util',
diff --git a/source4/lib/messaging/messaging.c 
b/source4/lib/messaging/messaging.c
index d91d175..bbc22ec 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -342,7 +342,7 @@ struct imessaging_context *imessaging_init(TALLOC_CTX 
*mem_ctx,
        }
 
        msg->msg_dgm_ref = messaging_dgm_ref(
-               msg, ev, server_id.unique_id, msg->sock_dir, msg->lock_dir,
+               msg, ev, &server_id.unique_id, msg->sock_dir, msg->lock_dir,
                imessaging_dgm_recv, msg, &ret);
 
        if (msg->msg_dgm_ref == NULL) {


-- 
Samba Shared Repository

Reply via email to