diff options
Diffstat (limited to 'source4/scripting')
-rwxr-xr-x | source4/scripting/python/examples/samr.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/scripting/python/examples/samr.py b/source4/scripting/python/examples/samr.py index 1f2afbe688..b3ea117b40 100755 --- a/source4/scripting/python/examples/samr.py +++ b/source4/scripting/python/examples/samr.py @@ -26,6 +26,9 @@ sys.path.insert(0, "bin/python") from samba.dcerpc import samr, security, lsa +def display_lsa_string(str): + return str.string + def FillUserInfo(samr, dom_handle, users, level): """fill a user array with user information from samrQueryUserInfo""" for i in range(len(users)): @@ -86,9 +89,9 @@ def test_EnumDomains(samr, handle): domains = toArray(samr.EnumDomains(handle, 0, -1)) print "Found %d domains" % len(domains) for idx, domain in domains: - print "\t%s (%d)" % (domain, idx) + print "\t%s (%d)" % (display_lsa_string(domain), idx) for idx, domain in domains: - print "Testing domain %s" % domain + print "Testing domain %s" % display_lsa_string(domain) sid = samr.LookupDomain(handle, domain) dom_handle = test_OpenDomain(samr, handle, sid) test_domain_ops(samr, dom_handle) |