summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2011-12-16 14:51:46 +0100
committerChristian Ambach <ambi@samba.org>2011-12-16 18:43:08 +0100
commit411d498b8ae7dc3c6263399cb4430b00fdcbbbd9 (patch)
tree9d314d37d531fa85ebcf620ceefd7c84cfa39360 /source3/lib
parent16bd41b7e708a6891da1ad812e20b0988f7ac79f (diff)
downloadsamba-411d498b8ae7dc3c6263399cb4430b00fdcbbbd9.tar.gz
samba-411d498b8ae7dc3c6263399cb4430b00fdcbbbd9.tar.bz2
samba-411d498b8ae7dc3c6263399cb4430b00fdcbbbd9.zip
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
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/dbwrap/dbwrap_tdb.c6
1 files changed, 5 insertions, 1 deletions
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)