summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-09-06 21:43:31 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:43:57 -0500
commitccdd921e61c95e8e2d1764a74603c863ca2867ba (patch)
tree12b556fdfec9a44d1af939dd22603d113659012e /source3/nsswitch/winbindd_cache.c
parent012c9e9cf9db9147cd95e1abb0f8db0548e0a9d9 (diff)
downloadsamba-ccdd921e61c95e8e2d1764a74603c863ca2867ba.tar.gz
samba-ccdd921e61c95e8e2d1764a74603c863ca2867ba.tar.bz2
samba-ccdd921e61c95e8e2d1764a74603c863ca2867ba.zip
r18191: Fix the online/offline state handling of winbindd.
Instead of trying to do this in the winbindd_cache entries, add a timed even handler to probe every 5 mins when disconnected. Fix events to run all pending events, rather than only one. Jeremy. (This used to be commit 7bfbe1b4fb9a91c6678035f220bbf0b4f5afdcac)
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r--source3/nsswitch/winbindd_cache.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index 27d37267b5..cb4f405ee0 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -473,12 +473,10 @@ static BOOL centry_expired(struct winbindd_domain *domain, const char *keystr, s
return False;
}
- /* when the domain is offline and we havent checked in the last 30
- * seconds if it has become online again, return the cached entry.
+ /* when the domain is offline return the cached entry.
* This deals with transient offline states... */
- if (!domain->online &&
- !NT_STATUS_IS_OK(check_negative_conn_cache(domain->name, domain->dcname))) {
+ if (!domain->online) {
DEBUG(10,("centry_expired: Key %s for domain %s valid as domain is offline.\n",
keystr, domain->name ));
return False;
@@ -2552,7 +2550,7 @@ void set_global_winbindd_state_online(void)
tdb_delete_bystring(wcache->tdb, "WINBINDD_OFFLINE");
}
-BOOL get_global_winbindd_state_online(void)
+BOOL get_global_winbindd_state_offline(void)
{
return global_winbindd_offline_state;
}