summaryrefslogtreecommitdiff
path: root/swat/scripting/server
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-20 22:45:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:34:14 -0500
commit2997f4bd43420163ee01fcbacdf8cf958dedcfea (patch)
tree92ed5c08973bd6ee18eb5454b4c89df17bdcb7a0 /swat/scripting/server
parent449c6acd70221ca257eeb4b82de428760e089d59 (diff)
downloadsamba-2997f4bd43420163ee01fcbacdf8cf958dedcfea.tar.gz
samba-2997f4bd43420163ee01fcbacdf8cf958dedcfea.tar.bz2
samba-2997f4bd43420163ee01fcbacdf8cf958dedcfea.zip
r9434: moved the registry editor into a common js library. Deryck, does this
look ok? Apologies if this treads on your toes. (This used to be commit 8295eb01c0e1eec4f7c5bd211eac80b92ff9549e)
Diffstat (limited to 'swat/scripting/server')
-rw-r--r--swat/scripting/server/regedit.esp35
1 files changed, 35 insertions, 0 deletions
diff --git a/swat/scripting/server/regedit.esp b/swat/scripting/server/regedit.esp
new file mode 100644
index 0000000000..31977d5a51
--- /dev/null
+++ b/swat/scripting/server/regedit.esp
@@ -0,0 +1,35 @@
+<%
+/*
+ server side AJAJ functions for registry editing. These go along
+ with scripting/client/regedit.js
+*/
+libinclude("base.js");
+libinclude("winreg.js");
+libinclude("server_call.js");
+
+/*
+ server side call to return a listing of elements in a winreg path
+*/
+function enum_path(binding, path) {
+ printf("enum_path(%s, %s)\n", binding, path);
+ var reg = winreg_init();
+ security_init(reg);
+
+ reg.credentials = session.authinfo.credentials;
+
+ var status = reg.connect(binding);
+ if (status.is_ok != true) {
+ printVars(status);
+ return undefined;
+ }
+ var list = winreg_enum_path(reg, path);
+ return list;
+}
+
+/* register a call for clients to make */
+var call = servCallObj();
+call.add('enum_path', enum_path);
+
+/* run the function that was asked for */
+call.run();
+%>