mirror of
https://github.com/samba-team/samba.git
synced 2025-03-26 18:50:30 +03:00
s3:dbwrap: add specific dbwrap_wipe() implementation to dbwrap_tdb
Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
3dc607c0c6
commit
97fef0c2fd
@ -188,6 +188,13 @@ static int db_tdb_exists(struct db_context *db, TDB_DATA key)
|
||||
return tdb_exists(ctx->wtdb->tdb, key);
|
||||
}
|
||||
|
||||
static int db_tdb_wipe(struct db_context *db)
|
||||
{
|
||||
struct db_tdb_ctx *ctx = talloc_get_type_abort(
|
||||
db->private_data, struct db_tdb_ctx);
|
||||
return tdb_wipe_all(ctx->wtdb->tdb);
|
||||
}
|
||||
|
||||
static int db_tdb_parse(struct db_context *db, TDB_DATA key,
|
||||
int (*parser)(TDB_DATA key, TDB_DATA data,
|
||||
void *private_data),
|
||||
@ -383,6 +390,7 @@ struct db_context *db_open_tdb(TALLOC_CTX *mem_ctx,
|
||||
result->transaction_commit = db_tdb_transaction_commit;
|
||||
result->transaction_cancel = db_tdb_transaction_cancel;
|
||||
result->exists = db_tdb_exists;
|
||||
result->wipe = db_tdb_wipe;
|
||||
return result;
|
||||
|
||||
fail:
|
||||
|
Loading…
x
Reference in New Issue
Block a user