ldb_wrap is a caching mechansim, and it should probably be removed
but for now provide a way to avoid it in specific cases where we
know it is harmful.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jo Sutton <josutton@catalyst.net.nz>
*/
#define LDB_FLG_DONT_CREATE_DB 64
+/**
+ * Allow DB create time flags that have meaning only to our
+ * calling application or modules. These must be in this range:
+ */
+#define LDB_FLG_PRIVATE_MASK 0xff000000
+
/*
structures for ldb_parse_tree handling code
*/
*ldb_ret = ldb;
return LDB_SUCCESS;
}
-
+
+ if (flags & SAMBA_LDB_WRAP_CONNECT_FLAG_NO_SHARE_CONTEXT) {
+ *ldb_ret = ldb;
+ return LDB_SUCCESS;
+ }
+
if (!ldb_wrap_add(url, ev_ctx, lp_ctx, session_info, NULL, flags, ldb)) {
*errstring = talloc_asprintf(mem_ctx,
"Failed to add cached DB reference"
*/
#define SAMBA_LMDB_LEVEL_ONE_FEATURE "lmdbLevelOne"
+#define SAMBA_LDB_WRAP_CONNECT_FLAG_NO_SHARE_CONTEXT 0x01000000
+
#endif /* __SAMDB_H__ */