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

tpot at samba.org tpot at samba.org
Thu Oct 28 06:13:42 GMT 2004


Author: tpot
Date: 2004-10-28 06:13:42 +0000 (Thu, 28 Oct 2004)
New Revision: 3308

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

Log:
Handle servers that don't have samr_Connect5.

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-10-28 05:09:42 UTC (rev 3307)
+++ branches/SAMBA_4_0/source/scripting/swig/torture/samr.py	2004-10-28 06:13:42 UTC (rev 3308)
@@ -15,8 +15,8 @@
     s = {}
     s['handle'] = result['connect_handle']
 
-    dcerpc.samr_Close(pipe, s)
-
+    handle = result['connect_handle']
+  
     print 'testing samr_Connect2'
 
     r = {}
@@ -69,9 +69,16 @@
     r['info']['info1']['unknown1'] = 0
     r['info']['info1']['unknown2'] = 0
 
-    result = dcerpc.samr_Connect5(pipe, r)
+    try:
+        result = dcerpc.samr_Connect5(pipe, r)
+        s = {}
+        s['handle'] = result['connect_handle']
+        dcerpc.samr_Close(pipe, s)
+    except dcerpc.NTSTATUS, arg:
+        if arg[0] != dcerpc.NT_STATUS_NET_WRITE_FAULT:
+            raise
 
-    return result['connect_handle']
+    return handle
     
 def test_QuerySecurity(pipe, handle):
 



More information about the samba-cvs mailing list