summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-07 22:40:49 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-07 22:40:49 +0100
commitc81de641cd9a114ca47242fa1fd56eef19e86505 (patch)
tree86cfa3cad12d31949d85f464a24b6d4fd9fa1a75 /source4/scripting/python
parentf4735b71807dee7b89fca3ac6f679663ebc22d76 (diff)
downloadsamba-c81de641cd9a114ca47242fa1fd56eef19e86505.tar.gz
samba-c81de641cd9a114ca47242fa1fd56eef19e86505.tar.bz2
samba-c81de641cd9a114ca47242fa1fd56eef19e86505.zip
Display lsa string contents.
Diffstat (limited to 'source4/scripting/python')
-rwxr-xr-xsource4/scripting/python/examples/samr.py7
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)