diff options
author | Michael Adam <obnox@samba.org> | 2007-08-31 10:47:42 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:30:26 -0500 |
commit | b3dcadbed0b4a1b7bb2e83df2c66bca9dcbcad60 (patch) | |
tree | 4cea44ed4f921e229aff533acdae2a10d6786a7b /source | |
parent | 90626652084c2ada6b2eb041db652720c03a1c3b (diff) | |
download | samba-b3dcadbed0b4a1b7bb2e83df2c66bca9dcbcad60.tar.gz samba-b3dcadbed0b4a1b7bb2e83df2c66bca9dcbcad60.tar.xz samba-b3dcadbed0b4a1b7bb2e83df2c66bca9dcbcad60.zip |
r24830: Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent
changes.)
Diffstat (limited to 'source')
-rw-r--r-- | source/nsswitch/winbindd_cache.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index eb79e281cd7..6925a082eee 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/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; +} + /********************************************************************* ********************************************************************/ |