summaryrefslogtreecommitdiff
path: root/source4/scripting/swig/torture
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-10-28 06:13:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:52 -0500
commit08dd85d26b8bdcd0ad95d855279294f3248c463f (patch)
tree1ea24fe286350a4505909bd9f7d1ae1de1267e0d /source4/scripting/swig/torture
parentaa19318fd513fb4d6a36793b96fb7ffa66622d6f (diff)
downloadsamba-08dd85d26b8bdcd0ad95d855279294f3248c463f.tar.gz
samba-08dd85d26b8bdcd0ad95d855279294f3248c463f.tar.bz2
samba-08dd85d26b8bdcd0ad95d855279294f3248c463f.zip
r3308: Handle servers that don't have samr_Connect5.
(This used to be commit 52af866ffb427427d21daf11a4ca9a8b9881f1d5)
Diffstat (limited to 'source4/scripting/swig/torture')
-rwxr-xr-xsource4/scripting/swig/torture/samr.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/source4/scripting/swig/torture/samr.py b/source4/scripting/swig/torture/samr.py
index ba650dfe75..435b3a81db 100755
--- a/source4/scripting/swig/torture/samr.py
+++ b/source4/scripting/swig/torture/samr.py
@@ -15,8 +15,8 @@ def test_Connect(pipe):
s = {}
s['handle'] = result['connect_handle']
- dcerpc.samr_Close(pipe, s)
-
+ handle = result['connect_handle']
+
print 'testing samr_Connect2'
r = {}
@@ -69,9 +69,16 @@ def test_Connect(pipe):
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):