From: Christian Ambach Date: Fri, 16 Dec 2011 13:51:46 +0000 (+0100) Subject: s3:dbwrap fix return value of db_tdb_parse X-Git-Url: http://git.samba.org/?p=mat%2Fsamba.git;a=commitdiff_plain;h=411d498b8ae7dc3c6263399cb4430b00fdcbbbd9 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 --- 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)