diff options
author | Herb Lewis <hlewis@panasas.com> | 2012-08-20 16:03:28 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2012-09-21 09:44:42 +0200 |
commit | aca082e6df0ae46b3c2267f0a5ebed91893aaef8 (patch) | |
tree | 6a260b9539f6cddc2784521fe93a8a8c396fadd3 | |
parent | 83148e290f436783dc24b7349be38e40049ce080 (diff) | |
download | samba-aca082e6df0ae46b3c2267f0a5ebed91893aaef8.tar.gz |
Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR parsing errors.
A connection is idle when both struct winbindd_cli_state->request AND
struct winbindd_cli_state->response are NULL. Otherwise we can flag
as idle a connection in the state of having sent the request to
the winbindd child (request != NULL) but not yet received a reply
(response == NULL).
(cherry picked from commit 36dc8a0f40a38d9c03570856cb4c843b74c1c7bd)
-rw-r--r-- | source3/winbindd/winbindd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index a990342a6a9..4442c73dbe8 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -872,7 +872,8 @@ static bool remove_idle_client(void) int nidle = 0; for (state = winbindd_client_list(); state; state = state->next) { - if (state->response == NULL && + if (state->request == NULL && + state->response == NULL && !state->pwent_state && !state->grent_state) { nidle++; if (!last_access || state->last_access < last_access) { |