mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
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 821bc84109
)
This commit is contained in:
parent
5daa21f558
commit
5e4962d9e7
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user