From f1535694f76afdd1c1d5db4240abe0f94b90f8c5 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 15 Sep 2010 18:24:53 +0200 Subject: s4:rootdse LDB module - better that the "edn" control handling is done last Signed-off-by: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/rootdse.c | 40 ++++++++++++++++---------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index b525c8fa5f..102cd90ce2 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -352,26 +352,6 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms } } - edn_control = ldb_request_get_control(req, LDB_CONTROL_EXTENDED_DN_OID); - - /* if the client sent us the EXTENDED_DN control then we need - to expand the DNs to have GUID and SID. W2K8 join relies on - this */ - if (edn_control) { - unsigned int i; - int ret; - for (i=0; dn_attrs[i]; i++) { - if (!do_attribute(attrs, dn_attrs[i])) continue; - ret = expand_dn_in_message(module, msg, dn_attrs[i], - edn_control, req); - if (ret != LDB_SUCCESS) { - DEBUG(0,(__location__ ": Failed to expand DN in rootDSE for %s\n", - dn_attrs[i])); - goto failed; - } - } - } - if (do_attribute(attrs, "isGlobalCatalogReady")) { /* MS-ADTS 3.1.1.3.2.10 Note, we should only return true here is we have @@ -404,6 +384,26 @@ static int rootdse_add_dynamic(struct ldb_module *module, struct ldb_message *ms /* TODO: lots more dynamic attributes should be added here */ + edn_control = ldb_request_get_control(req, LDB_CONTROL_EXTENDED_DN_OID); + + /* if the client sent us the EXTENDED_DN control then we need + to expand the DNs to have GUID and SID. W2K8 join relies on + this */ + if (edn_control) { + unsigned int i; + int ret; + for (i=0; dn_attrs[i]; i++) { + if (!do_attribute(attrs, dn_attrs[i])) continue; + ret = expand_dn_in_message(module, msg, dn_attrs[i], + edn_control, req); + if (ret != LDB_SUCCESS) { + DEBUG(0,(__location__ ": Failed to expand DN in rootDSE for %s\n", + dn_attrs[i])); + goto failed; + } + } + } + return LDB_SUCCESS; failed: -- cgit