From: Herb Lewis Date: Mon, 20 Aug 2012 21:51:28 +0000 (-0700) Subject: Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR... X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=21e67bdcee79b813ddb7b73f72a54b363db294d6 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). Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Tue Aug 21 01:31:46 CEST 2012 on sn-devel-104 --- diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 6d3fece7bd9..c43b5859e22 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -923,7 +923,8 @@ static void remove_client(struct winbindd_cli_state *state) /* Is a client idle? */ static bool client_is_idle(struct winbindd_cli_state *state) { - return (state->response == NULL && + return (state->request == NULL && + state->response == NULL && !state->pwent_state && !state->grent_state); }