source: branches/samba-3.5.x/swat2/scripting/server/regedit.esp

Last change on this file was 414, checked in by Herwig Bauernfeind, 15 years ago

Samba 3.5.0: Initial import

File size: 1.1 KB
Line 
1<%
2/*
3 server side AJAJ functions for registry editing. These go along
4 with scripting/client/regedit.js
5*/
6libinclude("base.js");
7libinclude("winreg.js");
8libinclude("server_call.js");
9
10/*
11 server side call to return a listing of keys in a winreg path
12*/
13function enum_keys(binding, path) {
14 printf("enum_keys(%s, %s)\n", binding, path);
15 var reg = winregObj();
16
17 reg.credentials = session.authinfo.credentials;
18
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);
25}
26
27/*
28 server side call to return a listing of values in a winreg path
29*/
30function enum_values(binding, path) {
31 printf("enum_values(%s, %s)\n", binding, path);
32 var reg = winregObj();
33
34 reg.credentials = session.authinfo.credentials;
35
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);
42}
43
44/* register a call for clients to make */
45var call = servCallObj();
46call.add('enum_keys', enum_keys);
47call.add('enum_values', enum_values);
48
49/* run the function that was asked for */
50call.run();
51%>
Note: See TracBrowser for help on using the repository browser.