summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-09-15 12:25:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:45 -0500
commit3791d88b87c490c5093c964ec71989ee62b1faa4 (patch)
treec4bc989718a5c06d737487b5bc99618f0f96b7fd /source4
parent2cfd0b654c693ef90b54cf309f816ed62c94b545 (diff)
downloadsamba-3791d88b87c490c5093c964ec71989ee62b1faa4.tar.gz
samba-3791d88b87c490c5093c964ec71989ee62b1faa4.tar.bz2
samba-3791d88b87c490c5093c964ec71989ee62b1faa4.zip
r2345: Add test for samr_QuerySecurity()
(This used to be commit f6978a007a79c97910856b3c639844495f16ebab)
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/scripting/swig/torture/samr.py47
1 files changed, 35 insertions, 12 deletions
diff --git a/source4/scripting/swig/torture/samr.py b/source4/scripting/swig/torture/samr.py
index 91b612dd72..e7ee4e8796 100755
--- a/source4/scripting/swig/torture/samr.py
+++ b/source4/scripting/swig/torture/samr.py
@@ -57,14 +57,34 @@ def test_Connect(handle):
result = dcerpc.samr_Connect5(pipe, r)
- print result
+ return result['handle']
+
+def test_QuerySecurity(pipe, handle):
+
+ print 'testing samr_QuerySecurity'
+
+ r = {}
+ r['handle'] = handle
+ r['sec_info'] = 7
+
+ result = dcerpc.samr_QuerySecurity(pipe, r)
+ print result
+
+# Parse command line
-# parse command line
parser = OptionParser()
-parser.add_option("-b", "--binding", action="store", type="string", dest="binding")
-parser.add_option("-d", "--domain", action="store", type="string", dest="domain")
-parser.add_option("-u", "--username", action="store", type="string", dest="username")
-parser.add_option("-p", "--password", action="store", type="string", dest="password")
+
+parser.add_option("-b", "--binding", action="store", type="string",
+ dest="binding")
+
+parser.add_option("-d", "--domain", action="store", type="string",
+ dest="domain")
+
+parser.add_option("-u", "--username", action="store", type="string",
+ dest="username")
+
+parser.add_option("-p", "--password", action="store", type="string",
+ dest="password")
(options, args) = parser.parse_args()
@@ -75,15 +95,18 @@ if not options.username or not options.password or not options.domain:
parser.error('You must supply a domain, username and password')
-binding=options.binding
-domain=options.domain
-username=options.username
-password=options.password
+binding = options.binding
+domain = options.domain
+username = options.username
+password = options.password
-# Connect to server
+print 'Connecting...'
pipe = dcerpc.pipe_connect(binding,
dcerpc.DCERPC_SAMR_UUID, dcerpc.DCERPC_SAMR_VERSION,
domain, username, password)
-test_Connect(pipe)
+handle = test_Connect(pipe)
+test_QuerySecurity(pipe, handle)
+
+print 'Done'