s3: let tdb_validate_child() use tdb_check()
authorStefan Metzmacher <metze@samba.org>
Fri, 4 Dec 2009 15:32:42 +0000 (16:32 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 7 Dec 2009 18:56:55 +0000 (19:56 +0100)
metze

source3/lib/tdb_validate.c

index 092546e3eb53b6df077f8286c7f3e962bc0f72b4..a1fb1850db88502949d6f865282909eb8bad66f5 100644 (file)
@@ -44,6 +44,17 @@ static int tdb_validate_child(struct tdb_context *tdb,
                goto out;
        }
 
+       /*
+        * we can simplify this by passing a check function,
+        * but I don't want to change all the callers...
+        */
+       ret = tdb_check(tdb, NULL, NULL);
+       if (ret == -1) {
+               v_status.tdb_error = True;
+               v_status.success = False;
+               goto out;
+       }
+
        /* Check if the tdb's freelist is good. */
        if (tdb_validate_freelist(tdb, &num_entries) == -1) {
                v_status.bad_freelist = True;