Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR...
authorHerb Lewis <hlewis@panasas.com>
Mon, 20 Aug 2012 21:51:28 +0000 (14:51 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 20 Aug 2012 23:31:46 +0000 (01:31 +0200)
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 <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 01:31:46 CEST 2012 on sn-devel-104

source3/winbindd/winbindd.c

index 6d3fece7bd9ec74b4660c50c411a8df67eb2f23c..c43b5859e22ab44cd8240d91d660203d51325d50 100644 (file)
@@ -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);
 }