summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-08-31 10:47:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:30:26 -0500
commita4c92698c652328d04206ab3b4aeabda9e5c2943 (patch)
tree2f3d63a4c38785da44208d9d82da6c69c1c2ba86 /source3/nsswitch
parente5533200ce30b62e199a5d7ba0368fb3e3d9a750 (diff)
downloadsamba-a4c92698c652328d04206ab3b4aeabda9e5c2943.tar.gz
samba-a4c92698c652328d04206ab3b4aeabda9e5c2943.tar.bz2
samba-a4c92698c652328d04206ab3b4aeabda9e5c2943.zip
r24830: Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent changes.) (This used to be commit b3dcadbed0b4a1b7bb2e83df2c66bca9dcbcad60)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cache.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c
index eb79e281cd..6925a082ee 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -3317,6 +3317,31 @@ done:
return ret;
}
+/***********************************************************************
+ Try and validate every entry in the winbindd cache.
+***********************************************************************/
+
+int winbindd_validate_cache_nobackup(void)
+{
+ int ret = -1;
+ const char *tdb_path = lock_path("winbindd_cache.tdb");
+
+ DEBUG(10, ("winbindd_validate_cache: replacing panic function\n"));
+ smb_panic_fn = validate_panic;
+
+ ret = tdb_validate(tdb_path, cache_traverse_validate_fn);
+
+ if (ret != 0) {
+ DEBUG(10, ("winbindd_validate_cache_nobackup: validation not "
+ "successful.\n"));
+ }
+
+ DEBUG(10, ("winbindd_validate_cache_nobackup: restoring panic "
+ "function\n"));
+ smb_panic_fn = smb_panic;
+ return ret;
+}
+
/*********************************************************************
********************************************************************/