Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR...
authorHerb Lewis <hlewis@panasas.com>
Mon, 20 Aug 2012 23:03:28 +0000 (16:03 -0700)
committerKarolin Seeger <kseeger@samba.org>
Thu, 23 Aug 2012 18:18:05 +0000 (20:18 +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).

source3/winbindd/winbindd.c

index a990342a6a994017bfe6753355c8f636e77130d1..4442c73dbe8773aca00714b24c400a36e03bc0ba 100644 (file)
@@ -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) {