summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/samba3dump
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-26 20:55:05 -0600
committerStefan Metzmacher <metze@samba.org>2007-12-26 15:03:02 -0600
commitc4d3666ac2821518be57ca89d963f77bbddaedf4 (patch)
treedc7cdeb6ff096808c98688541abdbaa33c344abf /source4/scripting/bin/samba3dump
parente0132b560257fd9b8562fbe378604e446d3153f3 (diff)
downloadsamba-c4d3666ac2821518be57ca89d963f77bbddaedf4.tar.gz
samba-c4d3666ac2821518be57ca89d963f77bbddaedf4.tar.bz2
samba-c4d3666ac2821518be57ca89d963f77bbddaedf4.zip
r26607: Fix reading of values and subkeys in Samba 3 registry files.
(This used to be commit e3d7454ef70d6fe9a1ce34eaf57268bd5b713ccf)
Diffstat (limited to 'source4/scripting/bin/samba3dump')
-rwxr-xr-xsource4/scripting/bin/samba3dump11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/scripting/bin/samba3dump b/source4/scripting/bin/samba3dump
index f8d10cbc71..8f56d423d8 100755
--- a/source4/scripting/bin/samba3dump
+++ b/source4/scripting/bin/samba3dump
@@ -80,7 +80,7 @@ def print_samba3_secrets(secrets):
for domain in secrets.domains():
print "\t--- %s ---" % domain
print "\tSID: %s" % secrets.get_sid(domain)
- print "\tGUID: %s" % secrets.get_dom_guid(domain)
+ print "\tGUID: %s" % secrets.get_domain_guid(domain)
print "\tPlaintext pwd: %s" % secrets.get_machine_password(domain)
if secrets.get_machine_last_change_time(domain):
print "\tLast Changed: %lu" % secrets.get_machine_last_change_time(domain)
@@ -93,11 +93,12 @@ def print_samba3_secrets(secrets):
def print_samba3_regdb(regdb):
print_header("Registry")
+ from registry import str_regtype
for k in regdb.keys():
- print "%s" % k
- for v in regdb.values(k):
- print "\t%s: type %d, length %d" % (v.name, v.type, v.data.length)
+ print "[%s]" % k
+ for (value_name, (type, value)) in regdb.values(k).items():
+ print "\"%s\"=%s:%s" % (value_name, str_regtype(type), value)
def print_samba3_winsdb(winsdb):
print_header("WINS Database")
@@ -151,7 +152,7 @@ def print_samba3_summary(samba3):
libdir = args[0]
if len(args) > 1:
- smbconf = args[2]
+ smbconf = args[1]
else:
smbconf = os.path.join(libdir, "smb.conf")