From 2b99336a56a47838510f9b8a01aab05363c424b6 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 28 Aug 2006 05:26:42 +0000 Subject: r17876: Require one less patch for the LDAP backend to work. This lets the modules or backend generate the host and domain GUID, rather than the randguid() function. These can still be specified from the command line. Andrew Bartlett (This used to be commit 32996ca9d62568006f8bee85a1f2f37c64c04fb5) --- source4/scripting/libjs/provision.js | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'source4/scripting') diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index f8d321e8cb..d8abcc352f 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -164,6 +164,8 @@ function ldb_erase(ldb) ldb.del("@ATTRIBUTES"); ldb.del("@SUBCLASSES"); ldb.del("@MODULES"); + ldb.del("@PARTITION"); + ldb.del("@KLUDGEACL"); /* and the rest */ var res = ldb.search("(&(|(objectclass=*)(dn=*))(!(dn=@BASEINFO)))", attrs); @@ -198,6 +200,9 @@ function ldb_erase_partitions(info, ldb) var res = ldb.search("(objectClass=*)", "", ldb.SCOPE_BASE, rootDSE_attrs); assert(typeof(res) != "undefined"); assert(res.length == 1); + if (typeof(res[0].namingContexts) == "undefined") { + return; + } for (j=0; j