From 2aa5601c0aa1c38e2cb3b86331b746261e74b2ce Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 17 Aug 2011 08:36:52 +0200 Subject: s3:dbwrap: move dbwrap_delete() back to dbwrap.c, the core of the dbwrap subsystem --- source3/lib/dbwrap/dbwrap.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source3/lib/dbwrap/dbwrap.c') diff --git a/source3/lib/dbwrap/dbwrap.c b/source3/lib/dbwrap/dbwrap.c index 5b87fd3154..5054316271 100644 --- a/source3/lib/dbwrap/dbwrap.c +++ b/source3/lib/dbwrap/dbwrap.c @@ -78,3 +78,17 @@ TDB_DATA dbwrap_fetch(struct db_context *db, TALLOC_CTX *mem_ctx, return result; } + +NTSTATUS dbwrap_delete(struct db_context *db, TDB_DATA key) +{ + struct db_record *rec; + NTSTATUS status; + + rec = db->fetch_locked(db, talloc_tos(), key); + if (rec == NULL) { + return NT_STATUS_NO_MEMORY; + } + status = rec->delete_rec(rec); + TALLOC_FREE(rec); + return status; +} -- cgit