ldb_global_init: int (void)
ldb_handle_get_event_context: struct tevent_context *(struct ldb_handle *)
ldb_handle_new: struct ldb_handle *(TALLOC_CTX *, struct ldb_context *)
+ldb_handle_use_global_event_context: void (struct ldb_handle *)
ldb_handler_copy: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *)
ldb_handler_fold: int (struct ldb_context *, void *, const struct ldb_val *, struct ldb_val *)
ldb_init: struct ldb_context *(TALLOC_CTX *, struct tevent_context *)
return ldb_get_event_context(handle->ldb);
}
+/*
+ * This function forces a specific ldb handle to use the global event
+ * context. This allows a nested event loop to operate, so any open
+ * transaction also needs to be aborted.
+ *
+ * Any events on this event context will be lost
+ *
+ * This is used in Samba when sending an IRPC to another part of the
+ * same process instead of making a local DB modification.
+ */
+void ldb_handle_use_global_event_context(struct ldb_handle *handle)
+{
+ TALLOC_FREE(handle->event_context);
+}
+
void ldb_set_require_private_event_context(struct ldb_context *ldb)
{
ldb->require_private_event_context = true;
#define LDB_UNPACK_DATA_FLAG_NO_DN 0x0002
#define LDB_UNPACK_DATA_FLAG_NO_VALUES_ALLOC 0x0004
+/*
+ * This function forces a specific ldb handle to use the global event
+ * context. This allows a nested event loop to operate, so any open
+ * transaction also needs to be aborted.
+ *
+ * Any events on this event context will be lost
+ *
+ * This is used in Samba when sending an IRPC to another part of the
+ * same process instead of making a local DB modification.
+ */
+void ldb_handle_use_global_event_context(struct ldb_handle *handle);
+
#endif