summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamenim@samba.org>2010-07-06 03:31:17 +0300
committerKamen Mazdrashki <kamenim@samba.org>2010-07-08 02:38:36 +0300
commit0c4bbb7106cc2d49052eb85f995dc991b578d885 (patch)
tree1b7a62cffb36e47a5022aa80c5e5c269b61a74b1 /source4/dsdb
parent62a0f11dcbc0dbc7dbb78442d933c0fccee2282b (diff)
downloadsamba-0c4bbb7106cc2d49052eb85f995dc991b578d885.tar.gz
samba-0c4bbb7106cc2d49052eb85f995dc991b578d885.tar.bz2
samba-0c4bbb7106cc2d49052eb85f995dc991b578d885.zip
s4-dsdb: Implement module switching in dsdb_module_search_dn()
This allows caller to choose from where to start DN search
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/util.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c
index 00ae593c46..8797b106e7 100644
--- a/source4/dsdb/samdb/ldb_modules/util.c
+++ b/source4/dsdb/samdb/ldb_modules/util.c
@@ -71,7 +71,16 @@ int dsdb_module_search_dn(struct ldb_module *module,
return ret;
}
- ret = ldb_next_request(module, req);
+ /* Run the new request */
+ if (dsdb_flags & DSDB_FLAG_OWN_MODULE) {
+ const struct ldb_module_ops *ops = ldb_module_get_ops(module);
+ ret = ops->modify(module, req);
+ } else if (dsdb_flags & DSDB_FLAG_TOP_MODULE) {
+ ret = ldb_request(ldb_module_get_ctx(module), req);
+ } else {
+ SMB_ASSERT(dsdb_flags & DSDB_FLAG_NEXT_MODULE);
+ ret = ldb_next_request(module, req);
+ }
if (ret == LDB_SUCCESS) {
ret = ldb_wait(req->handle, LDB_WAIT_ALL);
}