svn commit: samba r24830 - in branches: SAMBA_3_2/source/nsswitch
SAMBA_3_2_0/source/nsswitch
obnox at samba.org
obnox at samba.org
Fri Aug 31 10:47:42 GMT 2007
Author: obnox
Date: 2007-08-31 10:47:42 +0000 (Fri, 31 Aug 2007)
New Revision: 24830
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=24830
Log:
Add a winbindd cache validation function that does not do
backup and corrupt file handling. (To be used in subsequent
changes.)
Modified:
branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c
branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c
Changeset:
Modified: branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c 2007-08-31 10:30:14 UTC (rev 24829)
+++ branches/SAMBA_3_2/source/nsswitch/winbindd_cache.c 2007-08-31 10:47:42 UTC (rev 24830)
@@ -3317,6 +3317,31 @@
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;
+}
+
/*********************************************************************
********************************************************************/
Modified: branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c 2007-08-31 10:30:14 UTC (rev 24829)
+++ branches/SAMBA_3_2_0/source/nsswitch/winbindd_cache.c 2007-08-31 10:47:42 UTC (rev 24830)
@@ -3317,6 +3317,31 @@
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;
+}
+
/*********************************************************************
********************************************************************/
More information about the samba-cvs
mailing list