s3:winbindd: avoid usage of procid_self()
authorStefan Metzmacher <metze@samba.org>
Mon, 15 Apr 2013 09:28:47 +0000 (11:28 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 18 Apr 2013 11:15:10 +0000 (13:15 +0200)
metze

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/winbindd/winbindd.c

index f5da15c259571b91127bda14b5c1ea3d58bca685..7a0700dffa6569ae605136f3ebe34da2783ac1ef 100644 (file)
@@ -212,7 +212,9 @@ static void terminate(bool is_parent)
 #endif
 
        if (is_parent) {
-               serverid_deregister(procid_self());
+               struct messaging_context *msg = winbind_messaging_context();
+               struct server_id self = messaging_server_id(msg);
+               serverid_deregister(self);
                pidfile_unlink(lp_piddir(), "winbindd");
        }