summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2011-01-15 18:12:09 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2011-01-15 19:01:11 +0100
commit93d96414be1e7fbf895a05025c0a3422dc55c88e (patch)
treea25c4cd8a8e10993c8aaecaba29ada9ce144479b /source4/dsdb/common
parent32e7d7654f6e446d85da4b81b14e7989b8d030d5 (diff)
downloadsamba-93d96414be1e7fbf895a05025c0a3422dc55c88e.tar.gz
samba-93d96414be1e7fbf895a05025c0a3422dc55c88e.tar.bz2
samba-93d96414be1e7fbf895a05025c0a3422dc55c88e.zip
s4:dsdb_find_nc_root - fix it up to let the provisioning work correctly
Use the temporary list unless we have at least the three main "namingContexts" from the rootDSE available (Default, Configuration, Schema - these are mandatory on all AD deployments!). This bug has been discovered by Nadya in relation with her SD work. Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Sat Jan 15 19:01:11 CET 2011 on sn-devel-104
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index b2d4be0068..148a77d153 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3284,10 +3284,10 @@ int dsdb_find_nc_root(struct ldb_context *samdb, TALLOC_CTX *mem_ctx, struct ldb
}
el = ldb_msg_find_element(root_res->msgs[0], "namingContexts");
- if (!el) {
+ if ((el == NULL) || (el->num_values < 3)) {
struct ldb_message *tmp_msg;
- DEBUG(5,("Finding namingContexts element in root_res failed. Using a temporary list."));
+ DEBUG(5,("dsdb_find_nc_root: Finding a valid 'namingContexts' element in the RootDSE failed. Using a temporary list."));
/* This generates a temporary list of NCs in order to let the
* provisioning work. */