summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
Diffstat (limited to 'swat')
-rw-r--r--swat/esptest/ldb.esp9
1 files changed, 4 insertions, 5 deletions
diff --git a/swat/esptest/ldb.esp b/swat/esptest/ldb.esp
index be894a1ea9..38a0422c50 100644
--- a/swat/esptest/ldb.esp
+++ b/swat/esptest/ldb.esp
@@ -8,24 +8,23 @@
var dbfile = lpGet("sam database");
var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
var ldb = ldb_init();
+var db = ldb.connect(dbfile);
-res = ldb.search(dbfile, "(objectClass=domain)", attrs);
+res = ldb.search(db, "(objectClass=domain)", attrs);
multi_table(res, "dn");
%>
<h3>An unconstrained search</h3>
<%
-var dbfile = lpGet("sam database");
-
-res = ldb.search(dbfile, "(objectClass=user)");
+res = ldb.search(db, "(objectClass=user)");
multi_table(res, "dn");
%>
<h3>A search with bad arguments</h3>
<%
-res = ldb.search("foo");
+res = ldb.search("blah", "foo");
%>
all done