diff options
author | Simo Sorce <idra@samba.org> | 2009-01-29 18:39:30 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-01-30 01:02:03 -0500 |
commit | 380874ef863866c94c999ef53252b9d30df65e88 (patch) | |
tree | aafdb720253d5a6013e2a23a0e81b0a9b90f054b /source4/lib/ldb/modules/operational.c | |
parent | a5f0640bf99e6f7e38b0b1e7a7a56f8f58ec7e47 (diff) | |
download | samba-380874ef863866c94c999ef53252b9d30df65e88.tar.gz samba-380874ef863866c94c999ef53252b9d30df65e88.tar.bz2 samba-380874ef863866c94c999ef53252b9d30df65e88.zip |
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.
Diffstat (limited to 'source4/lib/ldb/modules/operational.c')
-rw-r--r-- | source4/lib/ldb/modules/operational.c | 12 |
1 files changed, 9 insertions, 3 deletions
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;i<ARRAY_SIZE(search_sub);i++) { if (ldb_attr_cmp(attrs[a], search_sub[i].attr) != 0) { @@ -161,7 +164,7 @@ static int operational_search_post_process(struct ldb_module *module, return 0; failed: - ldb_debug_set(module->ldb, 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, |