summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd/winbindd.c')
-rw-r--r--source3/winbindd/winbindd.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 25ceeeb321..dbfd397f8b 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -123,19 +123,7 @@ static void flush_caches(void)
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()) {
+ if (!winbindd_cache_validate_and_initialize()) {
exit(1);
}
}
@@ -1194,14 +1182,9 @@ int main(int argc, char **argv, char **envp)
/*
* Ensure all cache and idmap caches are consistent
- * before we startup.
+ * and initialized before we startup.
*/
- if (winbindd_validate_cache() < 0) {
- DEBUG(0, ("corrupted tdb found, trying to restore backup\n"));
- }
-
- /* Initialize cache (ensure version is correct). */
- if (!initialize_winbindd_cache()) {
+ if (!winbindd_cache_validate_and_initialize()) {
exit(1);
}