We should not overwrite the "rc=1" initialization with the tdb_check
retval. This will lead to tdb_validate_child() returning 0 even when
validate_fn() found invalid entries.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=14789
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
+++ /dev/null
-samba3.smbtorture_s3.LOCAL-TDB-VALIDATE.smbtorture
tdb_validate_data_func validate_fn)
{
int ret = 1;
+ int check_rc;
int num_entries = 0;
struct tdb_validation_status v_status;
* 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 != 0) {
+ check_rc = tdb_check(tdb, NULL, NULL);
+ if (check_rc != 0) {
v_status.tdb_error = True;
v_status.success = False;
goto out;