diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-09-15 18:24:53 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-09-24 09:25:42 +1000 |
commit | f1535694f76afdd1c1d5db4240abe0f94b90f8c5 (patch) | |
tree | f105d30fa27b9bbe86e772fce38beb44fb3207b9 /source4/dsdb/samdb/ldb_modules | |
parent | b6eb1b207222ef776d1e3ec6bdf807dbd1b85911 (diff) | |
download | samba-f1535694f76afdd1c1d5db4240abe0f94b90f8c5.tar.gz samba-f1535694f76afdd1c1d5db4240abe0f94b90f8c5.tar.bz2 samba-f1535694f76afdd1c1d5db4240abe0f94b90f8c5.zip |
s4:rootdse LDB module - better that the "edn" control handling is done last
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/rootdse.c | 40 |
1 files changed, 20 insertions, 20 deletions
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: |