From 2f6e5436a707f4eed15130dff664327352c776fa Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 4 May 2011 12:11:04 +0200 Subject: [PATCH] s3: Properly deal with exited winbind children When a winbind child exits, we need to immediately close the socket. If not, the next request to that child will be sent to a socket without a listener, leading to a failed request. This failed request will then trigger a proper re-init. This patch avoids the one failed request. Autobuild-User: Volker Lendecke Autobuild-Date: Wed May 4 13:32:16 CEST 2011 on sn-devel-104 (cherry picked from commit d08414b6799747f224ba02300585c8b15ac6bc0e) --- source3/winbindd/winbindd_dual.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index ebafe8f3f02..d354f348bb6 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -511,6 +511,11 @@ void winbind_child_died(pid_t pid) DLIST_REMOVE(winbindd_children, child); child->pid = 0; + + if (child->sock != -1) { + close(child->sock); + child->sock = -1; + } } /* Ensure any negative cache entries with the netbios or realm names are removed. */ -- 2.11.4.GIT