svn commit: samba r2345 - in branches/SAMBA_4_0/source/scripting/swig/torture: .

tpot at samba.org tpot at samba.org
Wed Sep 15 12:25:56 GMT 2004


Author: tpot
Date: 2004-09-15 12:25:51 +0000 (Wed, 15 Sep 2004)
New Revision: 2345

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/scripting/swig/torture&rev=2345&nolog=1

Log:
Add test for samr_QuerySecurity()

Modified:
   branches/SAMBA_4_0/source/scripting/swig/torture/samr.py


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/swig/torture/samr.py
===================================================================
--- branches/SAMBA_4_0/source/scripting/swig/torture/samr.py	2004-09-15 12:24:53 UTC (rev 2344)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/samr.py	2004-09-15 12:25:51 UTC (rev 2345)
@@ -57,15 +57,35 @@
 
     result = dcerpc.samr_Connect5(pipe, r)
 
-    print result    
+    return result['handle']
+    
+def test_QuerySecurity(pipe, handle):
 
-# parse command line
+    print 'testing samr_QuerySecurity'
+
+    r = {}
+    r['handle'] = handle
+    r['sec_info'] = 7
+
+    result = dcerpc.samr_QuerySecurity(pipe, r)
+    print result
+
+# 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()
 
 if not options.binding:
@@ -75,15 +95,18 @@
    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'



More information about the samba-cvs mailing list