diff options
author | Karolin Seeger <kseeger@samba.org> | 2008-11-17 14:02:56 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-11-17 14:02:56 +0100 |
commit | a2088d3a7e3a25ce9c69de72037710ed17349721 (patch) | |
tree | 37c9a76415192bf197280e0b1206f4c62b642e9a | |
parent | 8e8104534b90fde188c12732e55bfa3479755861 (diff) | |
download | samba-a2088d3a7e3a25ce9c69de72037710ed17349721.tar.gz samba-a2088d3a7e3a25ce9c69de72037710ed17349721.tar.xz samba-a2088d3a7e3a25ce9c69de72037710ed17349721.zip |
Revert "Fix winbindd crash in an unusual failure mode. Bug #5737. Based on original patch from shargagan@novell.com"
This reverts commit 9a38a8454cfbd0011d804b3ab88c16e5d4f1c4bd.
-rw-r--r-- | source/winbindd/winbindd_dual.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c index 9a85c0ce43a..f2be6d692c5 100644 --- a/source/winbindd/winbindd_dual.c +++ b/source/winbindd/winbindd_dual.c @@ -196,12 +196,10 @@ static void async_request_fail(struct winbindd_async_request *state) TALLOC_FREE(state->reply_timeout_event); - /* If child exists and is not already reaped, - send kill signal to child. */ + SMB_ASSERT(state->child_pid != (pid_t)0); - if ((state->child->pid != (pid_t)0) && - (state->child->pid != (pid_t)-1) && - (state->child->pid == state->child_pid)) { + /* If not already reaped, send kill signal to child. */ + if (state->child->pid == state->child_pid) { kill(state->child_pid, SIGTERM); /* @@ -297,14 +295,12 @@ static void schedule_async_request(struct winbindd_child *child) } if ((child->pid == 0) && (!fork_domain_child(child))) { - /* fork_domain_child failed. - Cancel all outstanding requests */ + /* Cancel all outstanding requests */ while (request != NULL) { /* request might be free'd in the continuation */ struct winbindd_async_request *next = request->next; - - async_request_fail(request); + request->continuation(request->private_data, False); request = next; } return; |