summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-08 10:41:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:24 -0500
commit14b8ce1b01b7ea8bbf4379dbed363dfa34b7e400 (patch)
tree4d44ac5c998d86c5cfc2ff2121956a75eb0d77b5 /testprogs/ejs
parentaa37e5483b5f86d8b8c6a803acf5bb68f37ae022 (diff)
downloadsamba-14b8ce1b01b7ea8bbf4379dbed363dfa34b7e400.tar.gz
samba-14b8ce1b01b7ea8bbf4379dbed363dfa34b7e400.tar.bz2
samba-14b8ce1b01b7ea8bbf4379dbed363dfa34b7e400.zip
r8241: - take advantage of pointer comparison
- added testing of samr_EnumDomainGroups() (This used to be commit dd9465af5bb0516883aa5851e744c5b583474085)
Diffstat (limited to 'testprogs/ejs')
-rw-r--r--testprogs/ejs/samr.js29
1 files changed, 28 insertions, 1 deletions
diff --git a/testprogs/ejs/samr.js b/testprogs/ejs/samr.js
index fb444fb4b5..42d8439ac4 100644
--- a/testprogs/ejs/samr.js
+++ b/testprogs/ejs/samr.js
@@ -102,7 +102,30 @@ function test_EnumDomainUsers(conn, dom_handle)
status = dcerpc_samr_EnumDomainUsers(conn, io);
check_status_ok(status);
print("Found " + io.output.num_entries + " users\n");
- if (io.output.num_entries == 0) {
+ if (io.output.sam == NULL) {
+ return;
+ }
+ entries = io.output.sam.entries;
+ for (i=0;i<io.output.num_entries;i++) {
+ print("\t" + entries[i].name.string + "\n");
+ }
+}
+
+/*
+ test the samr_EnumDomainGroups interface
+*/
+function test_EnumDomainGroups(conn, dom_handle)
+{
+ var io = irpcObj();
+ print("Testing samr_EnumDomainGroups\n");
+ io.input.domain_handle = dom_handle;
+ io.input.resume_handle = 0;
+ io.input.acct_flags = 0;
+ io.input.max_size = -1;
+ status = dcerpc_samr_EnumDomainGroups(conn, io);
+ check_status_ok(status);
+ print("Found " + io.output.num_entries + " groups\n");
+ if (io.output.sam == NULL) {
return;
}
entries = io.output.sam.entries;
@@ -117,6 +140,7 @@ function test_EnumDomainUsers(conn, dom_handle)
function test_domain_ops(conn, dom_handle)
{
test_EnumDomainUsers(conn, dom_handle);
+ test_EnumDomainGroups(conn, dom_handle);
}
@@ -134,6 +158,9 @@ function test_EnumDomains(conn, handle)
status = dcerpc_samr_EnumDomains(conn, io);
check_status_ok(status);
print("Found " + io.output.num_entries + " domains\n");
+ if (io.output.sam == NULL) {
+ return;
+ }
entries = io.output.sam.entries;
for (i=0;i<io.output.num_entries;i++) {
print("\t" + entries[i].name.string + "\n");