git.samba.org
/
mat
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16bd41b
)
s3:dbwrap fix return value of db_tdb_parse
author
Christian Ambach
<ambi@samba.org>
Fri, 16 Dec 2011 13:51:46 +0000
(14:51 +0100)
committer
Christian Ambach
<ambi@samba.org>
Fri, 16 Dec 2011 17:43:08 +0000
(18:43 +0100)
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
patch
|
blob
|
history
diff --git
a/source3/lib/dbwrap/dbwrap_tdb.c
b/source3/lib/dbwrap/dbwrap_tdb.c
index d38c377e88f18e9b109c4125110458471cf487c9..2c82810c5065b4232210cb74533822269b3a8205 100644
(file)
--- 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)