summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-05-14 14:12:14 -0700
committerJeremy Allison <jra@samba.org>2008-05-14 14:12:14 -0700
commit4a0345d3fab80d586fb043831709ce8fe68f72f0 (patch)
tree85ab43fd9fae92fe26e66d38710c780ff9605079
parent9e4ea761055429185b7c76cf4c96ef5407fa7e83 (diff)
downloadsamba-4a0345d3fab80d586fb043831709ce8fe68f72f0.tar.gz
Fix bug #5464. Pointed out by Herb @ Connectathon. In fork_domain_child() we call :
CatchChild(); *before* we fork the domain child. This call establishes a signal handler that eats SIGCLD signals and doesn't call sys_select_signal() as the main daemon SIGCLD handler should do. This causes the parent to ignore dead children and time out, instead of calling winbind_child_died() on receipt of the signal. The correct fix is to move the CatchChild call into the child code after the fork. Jeremy.
-rw-r--r--source/nsswitch/winbindd_dual.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c
index 937924da391..1d4d312eeef 100644
--- a/source/nsswitch/winbindd_dual.c
+++ b/source/nsswitch/winbindd_dual.c
@@ -897,9 +897,6 @@ static BOOL fork_domain_child(struct winbindd_child *child)
ZERO_STRUCT(state);
state.pid = sys_getpid();
- /* Stop zombies */
- CatchChild();
-
/* Ensure we don't process messages whilst we're
changing the disposition for the child. */
message_block();
@@ -928,6 +925,9 @@ static BOOL fork_domain_child(struct winbindd_child *child)
/* Child */
+ /* Stop zombies in children */
+ CatchChild();
+
state.sock = fdpair[0];
close(fdpair[1]);