From aca082e6df0ae46b3c2267f0a5ebed91893aaef8 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 20 Aug 2012 16:03:28 -0700 Subject: [PATCH] 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) --- source3/winbindd/winbindd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) { -- 2.34.1