req->handle->nesting++;
req->handle->parent = parent;
req->handle->flags = parent->handle->flags;
+ req->handle->custom_flags = parent->handle->custom_flags;
}
*ret_req = req;
req->handle->nesting++;
req->handle->parent = parent;
req->handle->flags = parent->handle->flags;
+ req->handle->custom_flags = parent->handle->custom_flags;
}
*ret_req = req;
req->handle->nesting++;
req->handle->parent = parent;
req->handle->flags = parent->handle->flags;
+ req->handle->custom_flags = parent->handle->custom_flags;
}
*ret_req = req;
req->handle->nesting++;
req->handle->parent = parent;
req->handle->flags = parent->handle->flags;
+ req->handle->custom_flags = parent->handle->custom_flags;
}
*ret_req = req;
req->handle->nesting++;
req->handle->parent = parent;
req->handle->flags = parent->handle->flags;
+ req->handle->custom_flags = parent->handle->custom_flags;
}
*ret_req = req;
req->handle->nesting++;
req->handle->parent = parent;
req->handle->flags = parent->handle->flags;
+ req->handle->custom_flags = parent->handle->custom_flags;
}
*ret_req = req;
req->handle->flags &= ~LDB_HANDLE_FLAG_UNTRUSTED;
}
+/**
+ set custom flags. Those flags are set by applications using ldb,
+ they are application dependent and the same bit can have different
+ meaning in different application.
+ */
+void ldb_req_set_custom_flags(struct ldb_request *req, uint32_t flags)
+{
+ if (req != NULL && req->handle != NULL) {
+ req->handle->custom_flags = flags;
+ }
+}
+
+
+/**
+ get custom flags. Those flags are set by applications using ldb,
+ they are application dependent and the same bit can have different
+ meaning in different application.
+ */
+uint32_t ldb_req_get_custom_flags(struct ldb_request *req)
+{
+ if (req != NULL && req->handle != NULL) {
+ return req->handle->custom_flags;
+ }
+
+ /*
+ * 0 is not something any better or worse than
+ * anything else as req or the handle is NULL
+ */
+ return 0;
+}
+
+
/**
return true is a request is untrusted
*/
*/
bool ldb_req_is_untrusted(struct ldb_request *req);
+/**
+ set custom flags. Those flags are set by applications using ldb,
+ they are application dependent and the same bit can have different
+ meaning in different application.
+ */
+void ldb_req_set_custom_flags(struct ldb_request *req, uint32_t flags);
+
+/**
+ get custom flags. Those flags are set by applications using ldb,
+ they are application dependent and the same bit can have different
+ meaning in different application.
+ */
+uint32_t ldb_req_get_custom_flags(struct ldb_request *req);
+
/* load all modules from the given directory */
int ldb_modules_load(const char *modules_path, const char *version);