svn commit: samba r11587 - in branches/SAMBA_4_0/testprogs/ejs: .

mimir at samba.org mimir at samba.org
Tue Nov 8 23:23:17 GMT 2005


Author: mimir
Date: 2005-11-08 23:23:16 +0000 (Tue, 08 Nov 2005)
New Revision: 11587

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=11587

Log:
Trivial testing code giving an idea of how could using
subcontexts look like.


rafal


Modified:
   branches/SAMBA_4_0/testprogs/ejs/ejsnet.js


Changeset:
Modified: branches/SAMBA_4_0/testprogs/ejs/ejsnet.js
===================================================================
--- branches/SAMBA_4_0/testprogs/ejs/ejsnet.js	2005-11-08 23:22:21 UTC (rev 11586)
+++ branches/SAMBA_4_0/testprogs/ejs/ejsnet.js	2005-11-08 23:23:16 UTC (rev 11587)
@@ -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;



More information about the samba-cvs mailing list