winbindd: Remove reference to procid_self()
authorVolker Lendecke <vl@samba.org>
Mon, 12 Oct 2015 15:21:55 +0000 (17:21 +0200)
committerVolker Lendecke <vl@samba.org>
Mon, 19 Oct 2015 10:09:10 +0000 (12:09 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/winbindd/winbindd.c

index e6dd0e75fff69b58ec059a1319c0dc5aef23bdb2..d555127b84514737ef1c181d0ff5b7eed0cf10a3 100644 (file)
@@ -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) {