summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util_tdb.c6
-rw-r--r--source3/nsswitch/winbindd_cache.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c
index 5f9a5115b6..564edffdac 100644
--- a/source3/lib/util_tdb.c
+++ b/source3/lib/util_tdb.c
@@ -1118,12 +1118,6 @@ int tdb_validate(const char *tdb_path, tdb_validate_data_func validate_fn)
DEBUGADD(10, (" => overall success: %s\n", v_status.success ? "yes" : "no"));
}
- if (!v_status.success) {
- DEBUG(10, ("tdb_validate: validation not successful.\n"));
- DEBUGADD(10, ("removing tdb %s.\n", tdb_path));
- unlink(tdb_path);
- }
-
DEBUG(10, ("tdb_validate: waiting for child to finish...\n"));
while ((wait_pid = sys_waitpid(child_pid, &child_status, 0)) < 0) {
if (errno == EINTR) {
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;