summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/rootdse.c
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2006-05-29 23:46:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:08:43 -0500
commit0c7b82e5f6063de4114de21cf854ac67346e31f6 (patch)
treecc66c4f23e7029eae3be6edaf09d194d71016d47 /source4/dsdb/samdb/ldb_modules/rootdse.c
parent787d67c2cd780656cb5e6c0884c485f287b72c49 (diff)
downloadsamba-0c7b82e5f6063de4114de21cf854ac67346e31f6.tar.gz
samba-0c7b82e5f6063de4114de21cf854ac67346e31f6.tar.bz2
samba-0c7b82e5f6063de4114de21cf854ac67346e31f6.zip
r15942: Remove the sync internal ldb calls altogether.
This means that some modules have been disabled as well as they have not been ported to the async interface One of them is the ugly objectclass module. I hope that the change in samldb module will make the MMC happy without the need of this crappy module, we need proper handling in a decent schema module. proxy and ldb_map have also been disabled ldb_sqlite3 need to be ported as well (currenlty just broken). (This used to be commit 51083de795bdcbf649de926e86969adc20239b6d)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/rootdse.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c42
1 files changed, 2 insertions, 40 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 7e408264ec..46b34a469b 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -120,42 +120,6 @@ failed:
/*
handle search requests
*/
-static int rootdse_search_bytree(struct ldb_module *module, struct ldb_request *req)
-{
- struct ldb_search *s = &req->op.search;
- int ret;
- TALLOC_CTX *tmp_ctx;
-
- /* see if its for the rootDSE */
- if (s->scope != LDB_SCOPE_BASE ||
- (s->base && s->base->comp_num != 0)) {
- return ldb_next_request(module, req);
- }
-
- tmp_ctx = talloc_new(module);
-
- /* in our db we store the rootDSE with a DN of cn=rootDSE */
- s->base = ldb_dn_explode(tmp_ctx, "cn=rootDSE");
- s->tree = ldb_parse_tree(tmp_ctx, "dn=*");
- if (s->base == NULL || s->tree == NULL) {
- ldb_oom(module->ldb);
- talloc_free(tmp_ctx);
- return LDB_ERR_OPERATIONS_ERROR;
- }
-
- /* grab the static contents of the record */
- ret = ldb_next_request(module, req);
-
- req->op.search.res = s->res;
-
- if ((ret == LDB_SUCCESS) && (s->res->msgs != NULL)) {
- ret = rootdse_add_dynamic(module, s->res->msgs[0], s->attrs);
- }
-
- talloc_free(tmp_ctx);
-
- return ret;
-}
struct rootdse_async_context {
struct ldb_module *module;
@@ -192,7 +156,7 @@ error:
return LDB_ERR_OPERATIONS_ERROR;
}
-static int rootdse_search_async(struct ldb_module *module, struct ldb_request *req)
+static int rootdse_search(struct ldb_module *module, struct ldb_request *req)
{
struct rootdse_async_context *ac;
struct ldb_request *down_req;
@@ -274,8 +238,6 @@ static int rootdse_register_control(struct ldb_module *module, struct ldb_reques
static int rootdse_request(struct ldb_module *module, struct ldb_request *req)
{
switch (req->operation) {
- case LDB_REQ_SEARCH:
- return rootdse_search_bytree(module, req);
case LDB_REQ_REGISTER:
return rootdse_register_control(module, req);
@@ -305,7 +267,7 @@ static int rootdse_init(struct ldb_module *module)
static const struct ldb_module_ops rootdse_ops = {
.name = "rootdse",
.init_context = rootdse_init,
- .search = rootdse_search_async,
+ .search = rootdse_search,
.request = rootdse_request
};