summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerb Lewis <hlewis@panasas.com>2012-08-20 16:03:28 -0700
committerKarolin Seeger <kseeger@samba.org>2012-08-23 20:18:05 +0200
commit36dc8a0f40a38d9c03570856cb4c843b74c1c7bd (patch)
tree1d73eaa8dc785dadb22c63d0cb0b9aced14462f6
parente01df21a5dbe8f3d401d58de6cffa4d4ba340a24 (diff)
downloadsamba-36dc8a0f40a38d9c03570856cb4c843b74c1c7bd.tar.gz
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).
-rw-r--r--source3/winbindd/winbindd.c3
1 files changed, 2 insertions, 1 deletions
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) {