diff options
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r-- | source4/scripting/libjs/provision.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js index cd09962931..ea0f138260 100644 --- a/source4/scripting/libjs/provision.js +++ b/source4/scripting/libjs/provision.js @@ -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; |