s4-dsdb Fix generation of rootDSE domainControllerFunctionality
authorAndrew Bartlett <abartlet@samba.org>
Wed, 2 Feb 2011 03:01:35 +0000 (14:01 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 2 Feb 2011 04:21:13 +0000 (15:21 +1100)
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

index 007af57d540458220e3292145ccadd4c67f5f850..c5486b539b8fb4f11d8a111dc1772dd79fef3086 100644 (file)
@@ -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