diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-01-08 15:43:11 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-01-08 15:43:11 +0100 |
commit | bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7 (patch) | |
tree | 4edbacab40c67bb5d9d6bebe66a22949349cbf9a /source3/winbindd/winbindd.c | |
parent | 8dbeca6e9d06d573adebe8d9c5114b24d8782e43 (diff) | |
parent | 62c91987d902d4dfe27023ff2ec2fb73e602105b (diff) | |
download | samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.tar.gz samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.tar.bz2 samba-bfab6ab14bd2ba69fde8bbe32f56f308010c8ea7.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit ea36c3add588061cf338deabb2d8952f2213a8bd)
Diffstat (limited to 'source3/winbindd/winbindd.c')
-rw-r--r-- | source3/winbindd/winbindd.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c index 07cf22618e..5e9900d1d6 100644 --- a/source3/winbindd/winbindd.c +++ b/source3/winbindd/winbindd.c @@ -121,7 +121,24 @@ static void flush_caches(void) otherwise cached access denied errors due to restrict anonymous hang around until the sequence number changes. */ - wcache_invalidate_cache(); + if (!wcache_invalidate_cache()) { + DEBUG(0, ("invalidating the cache failed; revalidate the cache\n")); + /* Close the cache to be able to valdite the cache */ + close_winbindd_cache(); + /* + * Ensure all cache and idmap caches are consistent + * before we initialize the cache again. + */ + if (winbindd_validate_cache() < 0) { + DEBUG(0, ("winbindd cache tdb corrupt and no backup " + "could be restore.\n")); + } + + /* Initialize cache again. */ + if (!initialize_winbindd_cache()) { + exit(1); + } + } } /* Handle the signal by unlinking socket and exiting */ |