From: Ralph Boehme Date: Wed, 29 Oct 2025 13:34:08 +0000 (+0100) Subject: s3/lib: add g_lock_wipe() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2c668046fd7723d754e82ffe70853c5dc7ea795;p=thirdparty%2Fsamba.git s3/lib: add g_lock_wipe() Signed-off-by: Ralph Boehme Reviewed-by: Anoop C S --- diff --git a/source3/include/g_lock.h b/source3/include/g_lock.h index 07081575d9d..0ce1576c86f 100644 --- a/source3/include/g_lock.h +++ b/source3/include/g_lock.h @@ -136,4 +136,6 @@ NTSTATUS g_lock_watch_data_recv( struct server_id *blocker); void g_lock_wake_watchers(struct g_lock_ctx *ctx, TDB_DATA key); +NTSTATUS g_lock_wipe(struct g_lock_ctx *ctx, struct dbwrap_wipe_flags flags); + #endif diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index f48da07f9b8..d091fc05a2b 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -2031,3 +2031,14 @@ void g_lock_wake_watchers(struct g_lock_ctx *ctx, TDB_DATA key) nt_errstr(status)); } } + +NTSTATUS g_lock_wipe(struct g_lock_ctx *ctx, struct dbwrap_wipe_flags flags) +{ + int ret; + + ret = dbwrap_wipe(ctx->db, flags); + if (ret != 0) { + return NT_STATUS_INTERNAL_DB_ERROR; + } + return NT_STATUS_OK; +}