r26672: Janitorial: Remove uses of global_loadparm.
[Samba/gebeck_regimport.git] / swat / scripting / server / regedit.esp
blob58ba695c473c6bd86341fd1b7ef8655b8ea8aead
1 <%
2 /* 
3    server side AJAJ functions for registry editing. These go along
4    with scripting/client/regedit.js 
5 */
6 libinclude("base.js");
7 libinclude("winreg.js");
8 libinclude("server_call.js");
10 /* 
11    server side call to return a listing of keys in a winreg path
13 function enum_keys(binding, path) {
14         printf("enum_keys(%s, %s)\n", binding, path);
15         var reg = winregObj();
17         reg.credentials = session.authinfo.credentials;
19         var status = reg.connect(binding);
20         if (status.is_ok != true) {
21                 printVars(status);
22                 return undefined;
23         }
24         return reg.enum_path(path);
27 /* 
28    server side call to return a listing of values in a winreg path
30 function enum_values(binding, path) {
31         printf("enum_values(%s, %s)\n", binding, path);
32         var reg = winregObj();
34         reg.credentials = session.authinfo.credentials;
36         var status = reg.connect(binding);
37         if (status.is_ok != true) {
38                 printVars(status);
39                 return undefined;
40         }
41         return reg.enum_values(path);
44 /* register a call for clients to make */
45 var call = servCallObj();
46 call.add('enum_keys', enum_keys);
47 call.add('enum_values', enum_values);
49 /* run the function that was asked for */
50 call.run();