]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
dbwrap: add flags DBWRAP_STORE_PERSISTENT
authorRalph Boehme <slow@samba.org>
Wed, 11 Apr 2018 15:22:51 +0000 (17:22 +0200)
committerRalph Boehme <slow@samba.org>
Fri, 17 Jul 2026 10:18:35 +0000 (10:18 +0000)
Request storing a record with persistent semantics, the details of the
implementation are up to the backend.

Fwiw, the existing "flags" DBWRAP_[REPLACE|INSERT|MODIFY] are not flags in the
real sense, but rather something like an opcode/enum.

The new values DBWRAP_STORE_PERSISTENT will be real flags, so the backend
implementations have to be careful when processing the flags, eg if passing the
flags to TDB in the backend.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
lib/dbwrap/dbwrap.h

index 504fcd4e366429cce8e9df91a0b2d4e9172f6f51..cc5ef637b549f5c3a65e49c2847a1cf291987a0a 100644 (file)
@@ -45,6 +45,7 @@ enum dbwrap_lock_order {
 #define DBWRAP_REPLACE TDB_REPLACE     /* Replace record */
 #define DBWRAP_INSERT  TDB_INSERT      /* Don't overwrite an existing entry */
 #define DBWRAP_MODIFY  TDB_MODIFY      /* Don't create an existing entry    */
+#define DBWRAP_STORE_PERSISTENT 0x100  /* Store a persistent record */
 
 #define DBWRAP_TDB_FLAGS (DBWRAP_REPLACE | DBWRAP_INSERT | DBWRAP_MODIFY)