mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Return NOTFOUND from db_tdb_delete if the record does not exist
(This used to be commit 1ff924c4360952eb1d714a2f2ec3760b380c7a24)
This commit is contained in:
parent
b5cd038000
commit
fa5391a919
@ -196,8 +196,15 @@ static NTSTATUS db_tdb_delete(struct db_record *rec)
|
||||
struct db_tdb_ctx *ctx = talloc_get_type_abort(rec->private_data,
|
||||
struct db_tdb_ctx);
|
||||
|
||||
return (tdb_delete(ctx->wtdb->tdb, rec->key) == 0) ?
|
||||
NT_STATUS_OK : NT_STATUS_UNSUCCESSFUL;
|
||||
if (tdb_delete(ctx->wtdb->tdb, rec->key) == 0) {
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
if (tdb_error(ctx->wtdb->tdb) == TDB_ERR_NOEXIST) {
|
||||
return NT_STATUS_NOT_FOUND;
|
||||
}
|
||||
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
struct db_tdb_traverse_ctx {
|
||||
|
Loading…
x
Reference in New Issue
Block a user