diff options
author | Herb Lewis <hlewis@panasas.com> | 2012-08-20 14:51:28 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2012-08-21 01:31:46 +0200 |
commit | 21e67bdcee79b813ddb7b73f72a54b363db294d6 (patch) | |
tree | b8859fb54d9e1cfbd08d9db21ae33aa3a1778280 | |
parent | 84d6e09b954548d90d996f3ef6ce89edcbef3c24 (diff) | |
download | samba-21e67bdcee79b813ddb7b73f72a54b363db294d6.tar.gz samba-21e67bdcee79b813ddb7b73f72a54b363db294d6.tar.bz2 samba-21e67bdcee79b813ddb7b73f72a54b363db294d6.zip |
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).
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 01:31:46 CEST 2012 on sn-devel-104
-rw-r--r-- | 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 6d3fece7bd..c43b5859e2 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -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); } |