summaryrefslogtreecommitdiff
path: root/source3/nsswitch/winbindd_cache.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-07-09 15:34:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:55 -0500
commit5e4962d9e78caab4a4294dd0ae3e4a6caf179d77 (patch)
tree9d0c3cd0d844274e7137aea2fa3ece512a65be1b /source3/nsswitch/winbindd_cache.c
parent5daa21f558217d727e4f1d42b778e1beea69af4c (diff)
downloadsamba-5e4962d9e78caab4a4294dd0ae3e4a6caf179d77.tar.gz
samba-5e4962d9e78caab4a4294dd0ae3e4a6caf179d77.tar.bz2
samba-5e4962d9e78caab4a4294dd0ae3e4a6caf179d77.zip
r23769: Move removal of the tdb from the generic tdb_validate function
to the caller (winbindd_validate_cache in this case). Next, there will be a backup handling for the tdb files. Michael (This used to be commit 821bc84109625c9d85edee38fa26d16f9f0a0fe2)
Diffstat (limited to 'source3/nsswitch/winbindd_cache.c')
-rw-r--r--source3/nsswitch/winbindd_cache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index cfd182666e..67d689a5f3 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -3304,6 +3304,12 @@ int winbindd_validate_cache(void)
ret = tdb_validate(lock_path("winbindd_cache.tdb"),
cache_traverse_validate_fn);
+ if (ret != 0) {
+ DEBUG(10, ("winbindd_validate_cache: validation not successful.\n"));
+ DEBUGADD(10, ("removing tdb %s.\n", tdb_path));
+ unlink(tdb_path);
+ }
+
done:
DEBUG(10, ("winbindd_validate_cache: restoring panic function\n"));
smb_panic_fn = smb_panic;