mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:dbwrap: let dbwrap_fetch_uint32 distinguish between "not found" and "wrong format"
Signed-off-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
ae037670b8
commit
fe74b777d2
@ -112,10 +112,13 @@ NTSTATUS dbwrap_fetch_uint32_bystring(struct db_context *db,
|
||||
return status;
|
||||
}
|
||||
|
||||
if ((dbuf.dptr == NULL) || (dbuf.dsize != sizeof(uint32_t))) {
|
||||
TALLOC_FREE(dbuf.dptr);
|
||||
if ((dbuf.dptr == NULL) || (dbuf.dsize == 0)) {
|
||||
return NT_STATUS_NOT_FOUND;
|
||||
}
|
||||
if (dbuf.dsize != sizeof(uint32_t)) {
|
||||
TALLOC_FREE(dbuf.dptr);
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
*val = IVAL(dbuf.dptr, 0);
|
||||
TALLOC_FREE(dbuf.dptr);
|
||||
|
Loading…
Reference in New Issue
Block a user