summaryrefslogtreecommitdiff
path: root/swat/esptest/ldb.esp
blob: 20b95b1590e141091346fcf3988433794e576923 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<% page_header("columns", "ESP ldb test", "/esptest/menu.js"); %>

<h1>Samba4 ldb test</h1>

<h3>An attribute constrained search</h3>

<%
var lp = loadparm_init();
var dbfile = lp.get("sam database");
var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
var ldb = ldb_init();
var ok = ldb.connect(dbfile);
assert(ok);

res = ldb.search("(objectClass=domain)", attrs);
multi_table(res, "dn");
%>

<h3>An unconstrained search</h3>

<%
res = ldb.search("(objectClass=user)");
multi_table(res, "dn");
%>

<h3>A search with bad arguments</h3>

<%
res = ldb.search("=blah", "foo");
%>

all done

<% page_footer() %>