r21240: Fix longstanding Bug #4009.
authorGünther Deschner <gd@samba.org>
Thu, 8 Feb 2007 17:02:39 +0000 (17:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:50 +0000 (12:17 -0500)
commit69cee2a3ec4f39aab83a8cbf55307df182bf3065
tree9fa3b999223e30149041cbd17665f19f18abdb1c
parente6ce37679f121672802ea69e21d16ea360364389
r21240: Fix longstanding Bug #4009.

For the winbind cached ADS LDAP connection handling
(ads_cached_connection()) we were (incorrectly) assuming that the
service ticket lifetime equaled the tgt lifetime. For setups where the
service ticket just lives 10 minutes, we were leaving hundreds of LDAP
connections in CLOSE_WAIT state, until we fail to service entirely with
"Too many open files".

Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP
connection after the ads_do_search_retry() has failed to submit the
search request (although the bind succeeded (returning an expired
service ticket that we cannot delete from the memory cred cache - this
will get fixed later)).

Guenther
(This used to be commit 7e1a84b7226fb8dcd5d34c64a3478a6d886a9a91)
13 files changed:
source3/include/ads.h
source3/include/includes.h
source3/libads/kerberos.c
source3/libads/ldap_utils.c
source3/libads/sasl.c
source3/libsmb/cliconnect.c
source3/libsmb/clikrb5.c
source3/libsmb/clispnego.c
source3/nsswitch/idmap_ad.c
source3/nsswitch/winbindd_ads.c
source3/nsswitch/winbindd_pam.c
source3/rpc_client/cli_pipe.c
source3/utils/ntlm_auth.c