Last change
on this file since 689 was 414, checked in by Herwig Bauernfeind, 16 years ago |
Samba 3.5.0: Initial import
|
File size:
687 bytes
|
Line | |
---|
1 | <% page_header("columns", "ESP ldb test", "esptest"); %>
|
---|
2 |
|
---|
3 | <h1>Samba4 ldb test</h1>
|
---|
4 |
|
---|
5 | <h3>An attribute constrained search</h3>
|
---|
6 |
|
---|
7 | <%
|
---|
8 | var lp = loadparm_init();
|
---|
9 | var dbfile = lp.get("sam database");
|
---|
10 | var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
|
---|
11 | var ldb = ldb_init();
|
---|
12 | ldb.session_info = session.authinfo.session_info;
|
---|
13 |
|
---|
14 | var ok = ldb.connect(dbfile);
|
---|
15 | assert(ok);
|
---|
16 |
|
---|
17 | res = ldb.search("(objectClass=domain)", NULL, ldb.SCOPE_DEFAULT, attrs);
|
---|
18 | multi_table(res, "dn");
|
---|
19 | %>
|
---|
20 |
|
---|
21 | <h3>An unconstrained search</h3>
|
---|
22 |
|
---|
23 | <%
|
---|
24 | res = ldb.search("(objectClass=user)");
|
---|
25 | multi_table(res, "dn");
|
---|
26 | %>
|
---|
27 |
|
---|
28 | <h3>A search with bad arguments</h3>
|
---|
29 |
|
---|
30 | <%
|
---|
31 | res = ldb.search("=blah", "foo");
|
---|
32 | %>
|
---|
33 |
|
---|
34 | all done
|
---|
35 |
|
---|
36 | <% page_footer() %>
|
---|
Note:
See
TracBrowser
for help on using the repository browser.