From 380874ef863866c94c999ef53252b9d30df65e88 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 29 Jan 2009 18:39:30 -0500 Subject: Fix the mess with ldb includes. Separate again the public from the private headers. Add a new header specific for modules. Also add service function for modules as now ldb_context and ldb_module are opaque structures for them. --- source4/lib/ldb/modules/operational.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source4/lib/ldb/modules/operational.c') diff --git a/source4/lib/ldb/modules/operational.c b/source4/lib/ldb/modules/operational.c index 11c06c81bb..d862638389 100644 --- a/source4/lib/ldb/modules/operational.c +++ b/source4/lib/ldb/modules/operational.c @@ -73,7 +73,7 @@ modifiersName: not supported by w2k3? */ -#include "ldb_includes.h" +#include "ldb_module.h" /* construct a canonical name from a message @@ -126,8 +126,11 @@ static int operational_search_post_process(struct ldb_module *module, struct ldb_message *msg, const char * const *attrs) { + struct ldb_context *ldb; int i, a=0; + ldb = ldb_module_get_ctx(module); + for (a=0;attrs && attrs[a];a++) { for (i=0;ildb, LDB_DEBUG_WARNING, + ldb_debug_set(ldb, LDB_DEBUG_WARNING, "operational_search_post_process failed for attribute '%s'\n", attrs[a]); return -1; @@ -224,12 +227,15 @@ static int operational_callback(struct ldb_request *req, struct ldb_reply *ares) static int operational_search(struct ldb_module *module, struct ldb_request *req) { + struct ldb_context *ldb; struct operational_context *ac; struct ldb_request *down_req; const char **search_attrs = NULL; int i, a; int ret; + ldb = ldb_module_get_ctx(module); + ac = talloc(req, struct operational_context); if (ac == NULL) { return LDB_ERR_OPERATIONS_ERROR; @@ -268,7 +274,7 @@ static int operational_search(struct ldb_module *module, struct ldb_request *req } } - ret = ldb_build_search_req_ex(&down_req, module->ldb, ac, + ret = ldb_build_search_req_ex(&down_req, ldb, ac, req->op.search.base, req->op.search.scope, req->op.search.tree, -- cgit