From 0c4bbb7106cc2d49052eb85f995dc991b578d885 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Tue, 6 Jul 2010 03:31:17 +0300 Subject: s4-dsdb: Implement module switching in dsdb_module_search_dn() This allows caller to choose from where to start DN search --- source4/dsdb/samdb/ldb_modules/util.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules') 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); } -- cgit