Author: obnox Date: 2007-07-17 12:49:22 +0000 (Tue, 17 Jul 2007) New Revision: 23930
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23930 Log: Introduce tdb_validate_and_backup: This is a wrapper around tdb_validate, that does backup handling: * if the given tdb is valid, a backup is created (name.bak) * if the tdb is invalid, if a valid bakup is found (validated with the same validation function) under the name "name.bak" the orignal tdb is moved to name.corrupt and the backup is restored. For the backup handling, a variant of the backup_tdb function from lib/tdb/tools/tdbbackup.c is included in lib/util_tdb.c. The copy function for the traverse action eliminates the need to maintain a global success state by using a struct wrapping the target tdb and a success flag as the private data. Michael Modified: branches/SAMBA_3_2/source/lib/util_tdb.c branches/SAMBA_3_2_0/source/lib/util_tdb.c Changeset: Sorry, the patch is too large (525 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23930
