From: Herb Lewis Date: Mon, 20 Aug 2012 23:03:28 +0000 (-0700) Subject: Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR... X-Git-Tag: samba-3.5.18~10 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=aca082e6df0ae46b3c2267f0a5ebed91893aaef8 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) --- 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) {