]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 23 Aug 2012 18:17:32 +0000 (20:17 +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).
(cherry picked from commit f6f27baa92a20d5beeee23b8e1e86f0c9ace85b8)

Signed-off-by: Jeremy Allison <jra@samba.org>
source3/winbindd/winbindd.c

index c97ca08d39ef85053447abae0b110b6ffd1ff109..30771ebfb38b9d140188398f32b3bd9565625401 100644 (file)
@@ -890,7 +890,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);
 }