summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/show_deleted.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2009-01-30 16:31:19 -0500
committerSimo Sorce <idra@samba.org>2009-01-30 17:07:25 -0500
commitd4aeed879b21db41643250a23b1009b543e6c99f (patch)
tree8b9d26d91beb4846f443c1298649487c0461bf62 /source4/dsdb/samdb/ldb_modules/show_deleted.c
parent4519eae158e7821dcd2f818eea830cfcdd4a0105 (diff)
downloadsamba-d4aeed879b21db41643250a23b1009b543e6c99f.tar.gz
samba-d4aeed879b21db41643250a23b1009b543e6c99f.tar.bz2
samba-d4aeed879b21db41643250a23b1009b543e6c99f.zip
Fix all other modules to use ldb_module.h instead of ldb_private.h
The only 2 modules escaping the rule so far are rootdse and partitions
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/show_deleted.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/show_deleted.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/show_deleted.c b/source4/dsdb/samdb/ldb_modules/show_deleted.c
index 0914e51ebe..d619558c21 100644
--- a/source4/dsdb/samdb/ldb_modules/show_deleted.c
+++ b/source4/dsdb/samdb/ldb_modules/show_deleted.c
@@ -33,9 +33,7 @@
*/
#include "includes.h"
-#include "ldb/include/ldb.h"
-#include "ldb/include/ldb_errors.h"
-#include "ldb/include/ldb_private.h"
+#include "ldb/include/ldb_module.h"
#include "dsdb/samdb/samdb.h"
/* search */
@@ -79,6 +77,7 @@ static int show_deleted_search_callback(struct ldb_request *req,
static int show_deleted_search(struct ldb_module *module, struct ldb_request *req)
{
+ struct ldb_context *ldb;
struct ldb_control *control;
struct ldb_control **saved_controls;
struct show_deleted_search_request *ar;
@@ -87,6 +86,8 @@ static int show_deleted_search(struct ldb_module *module, struct ldb_request *re
char *new_filter;
int ret;
+ ldb = ldb_module_get_ctx(module);
+
ar = talloc_zero(req, struct show_deleted_search_request);
if (ar == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
@@ -102,7 +103,7 @@ static int show_deleted_search(struct ldb_module *module, struct ldb_request *re
new_filter = talloc_asprintf(ar, "(&(!(isDeleted=TRUE))%s)",
old_filter);
- ret = ldb_build_search_req(&down_req, module->ldb, ar,
+ ret = ldb_build_search_req(&down_req, ldb, ar,
req->op.search.base,
req->op.search.scope,
new_filter,
@@ -112,7 +113,7 @@ static int show_deleted_search(struct ldb_module *module, struct ldb_request *re
req);
} else {
- ret = ldb_build_search_req_ex(&down_req, module->ldb, ar,
+ ret = ldb_build_search_req_ex(&down_req, ldb, ar,
req->op.search.base,
req->op.search.scope,
req->op.search.tree,
@@ -136,11 +137,14 @@ static int show_deleted_search(struct ldb_module *module, struct ldb_request *re
static int show_deleted_init(struct ldb_module *module)
{
+ struct ldb_context *ldb;
int ret;
+ ldb = ldb_module_get_ctx(module);
+
ret = ldb_mod_register_control(module, LDB_CONTROL_SHOW_DELETED_OID);
if (ret != LDB_SUCCESS) {
- ldb_debug(module->ldb, LDB_DEBUG_ERROR,
+ ldb_debug(ldb, LDB_DEBUG_ERROR,
"extended_dn: Unable to register control with rootdse!\n");
return LDB_ERR_OPERATIONS_ERROR;
}