diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-08-08 03:23:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:31:31 -0500 |
commit | c8dfaec28a470c09430454a52bf3f4206ebf7037 (patch) | |
tree | 9a5cbb7ae4567b89c747075a440488d0d98254d6 /swat/esptest/registry_calls.esp | |
parent | 2dcd55f31fa0d4db4dbe3454a0b452f370f6d0c5 (diff) | |
download | samba-c8dfaec28a470c09430454a52bf3f4206ebf7037.tar.gz samba-c8dfaec28a470c09430454a52bf3f4206ebf7037.tar.bz2 samba-c8dfaec28a470c09430454a52bf3f4206ebf7037.zip |
r9212: the beginnings of a registry editor in SWAT, using client side javascript and AJAJ
This doesn't work at all well yet, mostly because of my inexperience
with client side javascript and what events are available
(This used to be commit 8073e84c7a5fd8d483685d769661c790a803ff49)
Diffstat (limited to 'swat/esptest/registry_calls.esp')
-rw-r--r-- | swat/esptest/registry_calls.esp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/swat/esptest/registry_calls.esp b/swat/esptest/registry_calls.esp new file mode 100644 index 0000000000..a5c1ae7a12 --- /dev/null +++ b/swat/esptest/registry_calls.esp @@ -0,0 +1,37 @@ +<% +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); + if (path == "\\") { + printf("IN ROOT\n"); + var list = new Array("HKLM", "HKCR", "HKPD"); + return list; + } + printf("binding=%s path=%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(); +%> |