From 60a2a7f46b232ad0529558c149973f5fad43cf69 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 20 Aug 2012 15:21:26 -0700 Subject: [PATCH 1/2] Ensure we keep last_access up to date when processing a request. --- source3/winbindd/winbindd.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 15aafeb..c97ca08 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -588,6 +588,7 @@ static void process_request(struct winbindd_cli_state *state) state->cmd_name = "unknown request"; state->recv_fn = NULL; + state->last_access = time(NULL); /* Process command */ -- 1.7.7.3 From bee142bfadfef161a94090f2c24152dda00968e7 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 20 Aug 2012 14:51:28 -0700 Subject: [PATCH 2/2] 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). (cherry picked from commit f6f27baa92a20d5beeee23b8e1e86f0c9ace85b8) Signed-off-by: Jeremy Allison --- source3/winbindd/winbindd.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index c97ca08..30771eb 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -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); } -- 1.7.7.3