summaryrefslogtreecommitdiff
path: root/swat/esptest/ldb.esp
diff options
context:
space:
mode:
Diffstat (limited to 'swat/esptest/ldb.esp')
-rw-r--r--swat/esptest/ldb.esp31
1 files changed, 17 insertions, 14 deletions
diff --git a/swat/esptest/ldb.esp b/swat/esptest/ldb.esp
index 3285574bf2..1bc75bce73 100644
--- a/swat/esptest/ldb.esp
+++ b/swat/esptest/ldb.esp
@@ -1,19 +1,16 @@
-<HTML>
-<TITLE>
-Samba4 ESP test
-</TITLE>
-<BODY>
+<% page_header("columns", "ESP ldb test"); %>
+
<h1>Samba4 ldb test</h1>
-<form name="LdbTest" method="POST" action="@@request['SCRIPT_NAME']">
- <input name="submit" type="submit" value="Cancel"><br>
+<form name="LdbTest" method="post" action="@@request['SCRIPT_NAME']">
+ <input name="submit" type="submit" value="Cancel" /><br />
</form>
<%
if (request['REQUEST_METHOD'] == "POST") {
/* if they cancelled then take them back to the list of tests */
if (form['submit'] == "Cancel") {
- redirect("index.esp");
+ redirect("/");
}
}
@@ -27,10 +24,10 @@ function showLdbRes(res) {
var a = r[j];
if (typeof(a) == "object") {
for (k in a) {
- write(j + "[" + k + "]=" + a[k] + "<br>\n");
+ write(j + "[" + k + "]=" + a[k] + "<br />\n");
}
} else {
- write(j + "=" + r[j] + "<br>\n");
+ write(j + "=" + r[j] + "<br />\n");
}
}
write("<p>");
@@ -43,7 +40,7 @@ Trying a attribute constrained search on samdb:<p>
<%
var dbfile = lpGet("sam database");
-var attrs = new Array("name", "dnsDomain", "objectSid");
+var attrs = new Array("name", "dnsDomain", "objectSid", "dn");
res = ldbSearch(dbfile, "(objectClass=domain)", attrs);
showLdbRes(res);
@@ -54,10 +51,16 @@ and now an unconstrained search:<p>
<%
var dbfile = lpGet("sam database");
-res = ldbSearch(dbfile, "(objectClass=domain)");
+res = ldbSearch(dbfile, "(objectClass=user)");
showLdbRes(res);
%>
+and a bad search<br>
+
+<%
+res = ldbSearch("foo");
+%>
+
+all done
-</BODY>
-</HTML>
+<% page_footer() %>