1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

s3:net: adapt idmap check to new dbwrap_fetch behavior not to return success if not found

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Gregor Beck 2011-11-04 10:55:47 +01:00 committed by Michael Adam
parent a3f6005211
commit 5bc44491d2

View File

@ -355,11 +355,8 @@ fetch_record(struct check_ctx* ctx, TALLOC_CTX* mem_ctx, TDB_DATA key)
NTSTATUS status;
status = dbwrap_fetch(ctx->diff, mem_ctx, key, &tmp);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Out of memory!\n"));
return tdb_null;
}
if (tmp.dptr != NULL) {
if (NT_STATUS_IS_OK(status)) {
TDB_DATA_diff diff = unpack_diff(tmp);
TDB_DATA ret = talloc_copy(mem_ctx, diff.nval);
talloc_free(tmp.dptr);
@ -368,7 +365,6 @@ fetch_record(struct check_ctx* ctx, TALLOC_CTX* mem_ctx, TDB_DATA key)
status = dbwrap_fetch(ctx->db, mem_ctx, key, &tmp);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("Out of memory!\n"));
return tdb_null;
}