1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

py:dcerpc/raw_testcase: maintain self.max_{xmit,recv}_frag

This was it's easier to alter once add support for SMB connections.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Stefan Metzmacher 2018-11-22 18:21:03 +01:00 committed by Jeremy Allison
parent 7fb5c575fb
commit 196cc4dbd3

View File

@ -58,6 +58,8 @@ class RawDCERPCTest(TestCase):
raise
finally:
pass
self.max_xmit_frag = 5840
self.max_recv_frag = 5840
def setUp(self):
super(RawDCERPCTest, self).setUp()
@ -830,13 +832,18 @@ class RawDCERPCTest(TestCase):
def generate_bind(self, call_id,
pfc_flags=(samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST |
samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST),
max_xmit_frag=5840,
max_recv_frag=5840,
max_xmit_frag=None,
max_recv_frag=None,
assoc_group_id=0,
ctx_list=[],
auth_info=b"",
ndr_print=None, hexdump=None):
if max_xmit_frag is None:
max_xmit_frag=self.max_xmit_frag
if max_recv_frag is None:
max_recv_frag=self.max_recv_frag
b = samba.dcerpc.dcerpc.bind()
b.max_xmit_frag = max_xmit_frag
b.max_recv_frag = max_recv_frag
@ -856,13 +863,18 @@ class RawDCERPCTest(TestCase):
def generate_alter(self, call_id,
pfc_flags=(samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_FIRST |
samba.dcerpc.dcerpc.DCERPC_PFC_FLAG_LAST),
max_xmit_frag=5840,
max_recv_frag=5840,
max_xmit_frag=None,
max_recv_frag=None,
assoc_group_id=0,
ctx_list=[],
auth_info=b"",
ndr_print=None, hexdump=None):
if max_xmit_frag is None:
max_xmit_frag=self.max_xmit_frag
if max_recv_frag is None:
max_recv_frag=self.max_recv_frag
a = samba.dcerpc.dcerpc.bind()
a.max_xmit_frag = max_xmit_frag
a.max_recv_frag = max_recv_frag