summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-09-08 04:36:00 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:17:55 -0500
commit932265660e95cb2b4f0134bfec79e119fb89df8a (patch)
tree5dad1ffd174ff5c2b24076231aff21ad32adda9b
parentcaa4bfce7c2e152bcdf95878677913987af70cbd (diff)
downloadsamba-932265660e95cb2b4f0134bfec79e119fb89df8a.tar.gz
samba-932265660e95cb2b4f0134bfec79e119fb89df8a.tar.bz2
samba-932265660e95cb2b4f0134bfec79e119fb89df8a.zip
r18248: Bail out with a error message if this search fails for some reason.
Andrew Bartlett (This used to be commit 77b810f548fffc1298978cc92c842f5e4fc13786)
-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");
}