From f9ff72cbda6b4e59448fd79ef9e12f264d48015f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 11 Jul 2005 00:23:57 +0000 Subject: r8298: - started building a library of js routines in scripting/libjs/ - switched the existing test programs over to using the library - added install of js lib (This used to be commit 2a444dedbe44347268affc6458196f93ca7d372b) --- source4/scripting/libjs/samr.js | 170 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 170 insertions(+) create mode 100644 source4/scripting/libjs/samr.js (limited to 'source4/scripting/libjs/samr.js') diff --git a/source4/scripting/libjs/samr.js b/source4/scripting/libjs/samr.js new file mode 100644 index 0000000000..a1f79b541a --- /dev/null +++ b/source4/scripting/libjs/samr.js @@ -0,0 +1,170 @@ +/* + samr rpc utility functions + Copyright Andrew Tridgell 2005 + released under the GNU GPL v2 or later +*/ + +if (global["HAVE_SAMR_JS"] != undefined) { + return; +} +HAVE_SAMR_JS=1 + +/* + return a list of names and indexes from a samArray +*/ +function samArray(output) +{ + var list = new Array(output.num_entries); + if (output.sam == NULL) { + return list; + } + var entries = output.sam.entries; + for (i=0;i