From 2e865bed0aa6d28d2543ca6ad0a9c3d73c7db53f Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 2 Feb 2011 14:01:35 +1100 Subject: s4-dsdb Fix generation of rootDSE domainControllerFunctionality The issue here is that when the samdb calls were removed, this call relied on going back to the top of the module stack, so as to re-enter the rootDSE search handler. It makes more sense to check the @ROOTDSE record directly, and therefore not to invoke the search() handler during the init. Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/rootdse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source4/dsdb/samdb/ldb_modules') diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 007af57d54..c5486b539b 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -846,8 +846,10 @@ static int rootdse_init(struct ldb_module *module) } } + /* For now, our own server's location in the DB is recorded in + * the @ROOTDSE record */ ret = dsdb_module_search(module, mem_ctx, &res, - ldb_dn_new(mem_ctx, ldb, ""), + ldb_dn_new(mem_ctx, ldb, "@ROOTDSE"), LDB_SCOPE_BASE, ds_attrs, DSDB_FLAG_NEXT_MODULE, NULL, NULL); if (ret == LDB_SUCCESS && res->count == 1) { struct ldb_dn *ds_dn -- cgit