From 411d498b8ae7dc3c6263399cb4430b00fdcbbbd9 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Fri, 16 Dec 2011 14:51:46 +0100 Subject: [PATCH] s3:dbwrap fix return value of db_tdb_parse use the TDB ecode to determine the NTSTATUS return value and not the return code that is just -1 --- source3/lib/dbwrap/dbwrap_tdb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source3/lib/dbwrap/dbwrap_tdb.c b/source3/lib/dbwrap/dbwrap_tdb.c index d38c377e88..2c82810c50 100644 --- a/source3/lib/dbwrap/dbwrap_tdb.c +++ b/source3/lib/dbwrap/dbwrap_tdb.c @@ -188,7 +188,11 @@ static NTSTATUS db_tdb_parse(struct db_context *db, TDB_DATA key, state.private_data = private_data; ret = tdb_parse_record(ctx->wtdb->tdb, key, db_tdb_parser, &state); - return map_nt_error_from_tdb(ret); + + if (ret != 0) { + return map_nt_error_from_tdb(tdb_error(ctx->wtdb->tdb)); + } + return NT_STATUS_OK; } static NTSTATUS db_tdb_store(struct db_record *rec, TDB_DATA data, int flag) -- 2.34.1