r18072: Really delete things in the base partition, after we changed where the
authorAndrew Bartlett <abartlet@samba.org>
Tue, 5 Sep 2006 10:45:05 +0000 (10:45 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:17:11 +0000 (14:17 -0500)
default search scope points to.

Andrew Bartlett
(This used to be commit 1a111817a361faab04e73b666624ce554f000034)

source4/scripting/libjs/provision.js

index cd09962931a40c83dedea9c0ece33c53532d96e2..ea0f138260b48e36deb0033e9e6fad258fe7d0dd 100644 (file)
@@ -168,7 +168,8 @@ function ldb_erase(ldb)
        ldb.del("@KLUDGEACL");
 
        /* and the rest */
-       var res = ldb.search("(&(|(objectclass=*)(dn=*))(!(dn=@BASEINFO)))", attrs);
+       var basedn = "";
+       var res = ldb.search("(&(|(objectclass=*)(dn=*))(!(dn=@BASEINFO)))", basedn, ldb.SCOPE_SUBTREE, attrs);
        var i;
        if (typeof(res) == "undefined") {
                ldb_delete(ldb);
@@ -177,10 +178,8 @@ function ldb_erase(ldb)
        for (i=0;i<res.length;i++) {
                ldb.del(res[i].dn);
        }
-       /* extra hack to ensure it's gone on remote ldap */
-       ldb.del("cn=ROOTDSE");
 
-       var res = ldb.search("(&(|(objectclass=*)(dn=*))(!(dn=@BASEINFO)))", attrs);
+       var res = ldb.search("(&(|(objectclass=*)(dn=*))(!(dn=@BASEINFO)))", basedn, ldb.SCOPE_SUBTREE, attrs);
        if (res.length != 0) {
                ldb_delete(ldb);
                return;