summaryrefslogtreecommitdiff
path: root/testprogs
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-17 01:40:14 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:26 -0500
commit66c3640366ed17b1bdc445f7e597a2446deeaa14 (patch)
tree4571ebf89f621e14c77bf6df2babe7ea7a9a90d9 /testprogs
parentbc6d35135d02185c2c28efbc7a2955317af87548 (diff)
downloadsamba-66c3640366ed17b1bdc445f7e597a2446deeaa14.tar.gz
samba-66c3640366ed17b1bdc445f7e597a2446deeaa14.tar.bz2
samba-66c3640366ed17b1bdc445f7e597a2446deeaa14.zip
r9341: updated the winreg test program to take advantage of the new EnumValue
functionality. It now completely enumerates a winreg tree. This would make a good basis for a js version of regshell if someone felt like taking that on. (This used to be commit 75d0cf78ec8c01dee2a6475d4c64417349d9ec3a)
Diffstat (limited to 'testprogs')
-rwxr-xr-xtestprogs/ejs/winreg.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/testprogs/ejs/winreg.js b/testprogs/ejs/winreg.js
index 22b20739f2..2febec8010 100755
--- a/testprogs/ejs/winreg.js
+++ b/testprogs/ejs/winreg.js
@@ -34,13 +34,22 @@ if (status.is_ok != true) {
return -1;
}
-function list_path(path) {
- var list = winreg_enum_path(reg, path);
+function list_values(path) {
+ var list = winreg_enum_values(reg, path);
var i;
if (list == undefined) {
return;
}
for (i=0;i<list.length;i++) {
+ printf("\ttype=%2d size=%4d '%s'\n", list[i].type, list[i].size, list[i].name);
+ }
+}
+
+function list_path(path) {
+ var list = winreg_enum_path(reg, path);
+ var i;
+ list_values(path);
+ for (i=0;i<list.length;i++) {
var npath;
if (path) {
npath = path + "\\" + list[i];