From: Ralph Boehme Date: Wed, 11 Apr 2018 15:22:51 +0000 (+0200) Subject: dbwrap: add flags DBWRAP_STORE_PERSISTENT X-Git-Tag: talloc-2.5.0~234 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4f0d4d11e4c3667587639313d820bc0f198db35;p=thirdparty%2Fsamba.git dbwrap: add flags DBWRAP_STORE_PERSISTENT 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 Reviewed-by: Martin Schwenke --- diff --git a/lib/dbwrap/dbwrap.h b/lib/dbwrap/dbwrap.h index 504fcd4e366..cc5ef637b54 100644 --- a/lib/dbwrap/dbwrap.h +++ b/lib/dbwrap/dbwrap.h @@ -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)