summaryrefslogtreecommitdiff
path: root/testprogs/ejs
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2005-11-08 23:23:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:45:54 -0500
commit6d3fac3fdcba7062e53c9621f6f69f010fb1eb86 (patch)
tree10354929c4a7ef28d3e809f3f991ab51c6f398f4 /testprogs/ejs
parent2a006a7e6bf4a8813b1c5d9b07643082d98a4988 (diff)
downloadsamba-6d3fac3fdcba7062e53c9621f6f69f010fb1eb86.tar.gz
samba-6d3fac3fdcba7062e53c9621f6f69f010fb1eb86.tar.bz2
samba-6d3fac3fdcba7062e53c9621f6f69f010fb1eb86.zip
r11587: Trivial testing code giving an idea of how could using
subcontexts look like. rafal (This used to be commit 5a338b04f37f6160f4aaf7d9758aa2d817516eb1)
Diffstat (limited to 'testprogs/ejs')
-rwxr-xr-xtestprogs/ejs/ejsnet.js15
1 files changed, 14 insertions, 1 deletions
diff --git a/testprogs/ejs/ejsnet.js b/testprogs/ejs/ejsnet.js
index a4dd27dd45..537312766a 100755
--- a/testprogs/ejs/ejsnet.js
+++ b/testprogs/ejs/ejsnet.js
@@ -1,4 +1,17 @@
#!/usr/bin/env smbscript
var ctx = NetContext("Administrator", "admin");
-ctx.CreateUser("noname");
+var usr_ctx = ctx.UserMgr("BUILTIN");
+if (usr_ctx == undefined) {
+ print("Couln't get user management context.\n");
+ return -1;
+}
+
+var status = usr_ctx.Create("noname");
+if (status.is_ok != true) {
+ print("Failed to create user account: " + status.errstr + "\n");
+ return -1;
+}
+
+print ("OK\n");
+return 0;