From 08dd85d26b8bdcd0ad95d855279294f3248c463f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 28 Oct 2004 06:13:42 +0000 Subject: r3308: Handle servers that don't have samr_Connect5. (This used to be commit 52af866ffb427427d21daf11a4ca9a8b9881f1d5) --- source4/scripting/swig/torture/samr.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source4') diff --git a/source4/scripting/swig/torture/samr.py b/source4/scripting/swig/torture/samr.py index ba650dfe759..435b3a81db0 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): -- cgit