summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/winbindd/winbindd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index f5da15c259..7a0700dffa 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -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");
}