*/
static int ldb_kv_index_filter(struct ltdb_private *ltdb,
const struct dn_list *dn_list,
- struct ltdb_context *ac,
+ struct ldb_kv_context *ac,
uint32_t *match_count,
enum key_truncation scope_one_truncation)
{
returns -1 if an indexed search is not possible, in which
case the caller should call ltdb_search_full()
*/
-int ldb_kv_search_indexed(struct ltdb_context *ac, uint32_t *match_count)
+int ldb_kv_search_indexed(struct ldb_kv_context *ac, uint32_t *match_count)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
struct ltdb_private *ltdb = talloc_get_type(ldb_module_get_private(ac->module), struct ltdb_private);
static int search_func(struct ltdb_private *ltdb, struct ldb_val key, struct ldb_val val, void *state)
{
struct ldb_context *ldb;
- struct ltdb_context *ac;
+ struct ldb_kv_context *ac;
struct ldb_message *msg, *filtered_msg;
int ret;
bool matched;
.dsize = key.length
};
- ac = talloc_get_type(state, struct ltdb_context);
+ ac = talloc_get_type(state, struct ldb_kv_context);
ldb = ldb_module_get_ctx(ac->module);
if (ldb_kv_key_is_record(tdb_key) == false) {
search the database with a LDAP-like expression.
this is the "full search" non-indexed variant
*/
-static int ldb_kv_search_full(struct ltdb_context *ctx)
+static int ldb_kv_search_full(struct ldb_kv_context *ctx)
{
void *data = ldb_module_get_private(ctx->module);
struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private);
}
static int ldb_kv_search_and_return_base(struct ltdb_private *ltdb,
- struct ltdb_context *ctx)
+ struct ldb_kv_context *ctx)
{
struct ldb_message *msg, *filtered_msg;
struct ldb_context *ldb = ldb_module_get_ctx(ctx->module);
search the database with a LDAP-like expression.
choses a search method
*/
-int ldb_kv_search(struct ltdb_context *ctx)
+int ldb_kv_search(struct ldb_kv_context *ctx)
{
struct ldb_context *ldb;
struct ldb_module *module = ctx->module;
prevent memory errors on callbacks
*/
struct ltdb_req_spy {
- struct ltdb_context *ctx;
+ struct ldb_kv_context *ctx;
};
/*
/*
add a record to the database
*/
-static int ldb_kv_add(struct ltdb_context *ctx)
+static int ldb_kv_add(struct ldb_kv_context *ctx)
{
struct ldb_module *module = ctx->module;
struct ldb_request *req = ctx->req;
/*
delete a record from the database
*/
-static int ldb_kv_delete(struct ltdb_context *ctx)
+static int ldb_kv_delete(struct ldb_kv_context *ctx)
{
struct ldb_module *module = ctx->module;
struct ldb_request *req = ctx->req;
/*
modify a record
*/
-static int ldb_kv_modify(struct ltdb_context *ctx)
+static int ldb_kv_modify(struct ldb_kv_context *ctx)
{
struct ldb_module *module = ctx->module;
struct ldb_request *req = ctx->req;
/*
rename a record
*/
-static int ldb_kv_rename(struct ltdb_context *ctx)
+static int ldb_kv_rename(struct ldb_kv_context *ctx)
{
struct ldb_module *module = ctx->module;
void *data = ldb_module_get_private(module);
/*
return sequenceNumber from @BASEINFO
*/
-static int ldb_kv_sequence_number(struct ltdb_context *ctx,
+static int ldb_kv_sequence_number(struct ldb_kv_context *ctx,
struct ldb_extended **ext)
{
struct ldb_context *ldb;
return ret;
}
-static void ldb_kv_request_done(struct ltdb_context *ctx, int error)
+static void ldb_kv_request_done(struct ldb_kv_context *ctx, int error)
{
struct ldb_context *ldb;
struct ldb_request *req;
struct timeval t,
void *private_data)
{
- struct ltdb_context *ctx;
- ctx = talloc_get_type(private_data, struct ltdb_context);
+ struct ldb_kv_context *ctx;
+ ctx = talloc_get_type(private_data, struct ldb_kv_context);
if (!ctx->request_terminated) {
/* request is done now */
talloc_free(ctx);
}
-static void ldb_kv_request_extended_done(struct ltdb_context *ctx,
+static void ldb_kv_request_extended_done(struct ldb_kv_context *ctx,
struct ldb_extended *ext,
int error)
{
req->callback(req, ares);
}
-static void ldb_kv_handle_extended(struct ltdb_context *ctx)
+static void ldb_kv_handle_extended(struct ldb_kv_context *ctx)
{
struct ldb_extended *ext = NULL;
int ret;
struct timeval t,
void *private_data)
{
- struct ltdb_context *ctx;
+ struct ldb_kv_context *ctx;
int ret;
- ctx = talloc_get_type(private_data, struct ltdb_context);
+ ctx = talloc_get_type(private_data, struct ldb_kv_context);
if (ctx->request_terminated) {
goto done;
struct ldb_control *control_permissive;
struct ldb_context *ldb;
struct tevent_context *ev;
- struct ltdb_context *ac;
+ struct ldb_kv_context *ac;
struct tevent_timer *te;
struct timeval tv;
unsigned int i;
ev = ldb_handle_get_event_context(req->handle);
- ac = talloc_zero(ldb, struct ltdb_context);
+ ac = talloc_zero(ldb, struct ldb_kv_context);
if (ac == NULL) {
ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
pid_t pid;
};
-struct ltdb_context {
+struct ldb_kv_context {
struct ldb_module *module;
struct ldb_request *req;
struct ldb_parse_tree;
-int ldb_kv_search_indexed(struct ltdb_context *ctx, uint32_t *);
+int ldb_kv_search_indexed(struct ldb_kv_context *ctx, uint32_t *);
int ldb_kv_index_add_new(struct ldb_module *module,
struct ltdb_private *ltdb,
const struct ldb_message *msg);
const struct ldb_message *msg,
const char *const *attrs,
struct ldb_message **filtered_msg);
-int ldb_kv_search(struct ltdb_context *ctx);
+int ldb_kv_search(struct ldb_kv_context *ctx);
/* The following definitions come from lib/ldb/ldb_tdb/ldb_tdb.c */
/*