]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3/lib: add g_lock_wipe()
authorRalph Boehme <slow@samba.org>
Wed, 29 Oct 2025 13:34:08 +0000 (14:34 +0100)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:37 +0000 (10:18 +0000)
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/include/g_lock.h
source3/lib/g_lock.c

index 07081575d9d9c52924e9f09b17be8e417fc80e77..0ce1576c86f481234e4be9a4af5d123a0df1768c 100644 (file)
@@ -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
index f48da07f9b83892f083ac7069c6f02c571ce666e..d091fc05a2b638ae23c21dca8edc1cf822e15292 100644 (file)
@@ -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;
+}