diff options
author | Volker Lendecke <vl@samba.org> | 2011-05-04 12:11:04 +0200 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2011-05-04 13:32:16 +0200 |
commit | d08414b6799747f224ba02300585c8b15ac6bc0e (patch) | |
tree | b66d86289b3d19093f2a8d55f274643106279eef /source3 | |
parent | b8eaec6b666b1f0d3711540c492edd79cd02b1fe (diff) | |
download | samba-d08414b6799747f224ba02300585c8b15ac6bc0e.tar.gz samba-d08414b6799747f224ba02300585c8b15ac6bc0e.tar.bz2 samba-d08414b6799747f224ba02300585c8b15ac6bc0e.zip |
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 <vlendec@samba.org>
Autobuild-Date: Wed May 4 13:32:16 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/winbindd_dual.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c index 088353d10f..1078f8d374 100644 --- a/source3/winbindd/winbindd_dual.c +++ b/source3/winbindd/winbindd_dual.c @@ -510,6 +510,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. */ |