summaryrefslogtreecommitdiff
path: root/source4/scripting/libjs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/libjs')
-rw-r--r--source4/scripting/libjs/provision.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index ea0f138260..952112b3ae 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/scripting/libjs/provision.js
@@ -224,6 +224,10 @@ function ldb_erase_partitions(info, ldb)
}
var res3 = ldb.search("(|(objectclass=*)(dn=*))", basedn, ldb.SCOPE_SUBTREE, attrs);
+ if (typeof(res3) == "undefined") {
+ info.message("ldb search failed: " + ldb.errstring() + "\n");
+ continue;
+ }
if (res3.length != 0) {
info.message("Failed to delete all records under " + basedn + ", " + res3.length + " records remaining\n");
}