summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-15 05:40:34 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:23:07 -0500
commit63535f566e2fbe9244fd3e50b9c8d1281b822fc0 (patch)
treee14f9101f03c29c7a076576efd36d3ac7a8e381f /testprogs/ejs
parent970ff9ba8d0b47fce6760e6adf9458820c5084b9 (diff)
downloadsamba-63535f566e2fbe9244fd3e50b9c8d1281b822fc0.tar.gz
samba-63535f566e2fbe9244fd3e50b9c8d1281b822fc0.tar.bz2
samba-63535f566e2fbe9244fd3e50b9c8d1281b822fc0.zip
r8481: switched ldb ejs called over to an OO interface, so you do:
var ldb = ldb_init(); res = ldb.search(dbfile, "(objectClass=user)"); you can also do: ldbSearch = ldb.search; res = ldbSearch(dbfile, "(objectClass=user)"); if you want the old interface (ie. you can use this to import functions into the global or local namespace). (This used to be commit 3093057d9735cbb62f57e7159264d5a28b85320f)
Diffstat (limited to 'testprogs/ejs')
-rw-r--r--testprogs/ejs/ldb.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/testprogs/ejs/ldb.js b/testprogs/ejs/ldb.js
index 7675197904..133de27aef 100644
--- a/testprogs/ejs/ldb.js
+++ b/testprogs/ejs/ldb.js
@@ -6,19 +6,20 @@ println("Trying a attribute constrained search on samdb");
var dbfile = lpGet("sam database");
var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
+var ldb = ldb_init();
-res = ldbSearch(dbfile, "(objectClass=domain)", attrs);
+res = ldb.search(dbfile, "(objectClass=domain)", attrs);
printVars(res);
println("and now an unconstrained search");
var dbfile = lpGet("sam database");
-res = ldbSearch(dbfile, "(objectClass=user)");
+res = ldb.search(dbfile, "(objectClass=user)");
printVars(res);
println("and a bad search");
-res = ldbSearch("foo");
+res = ldb.search("foo");
println("all done");