mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
CVE-2021-23192: python/tests/dcerpc: let generate_request_auth() use g_auth_level in all places
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14875 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Samuel Cabrero <scabrero@samba.org>
This commit is contained in:
parent
4786565316
commit
e21c405163
@ -922,12 +922,12 @@ class RawDCERPCTest(TestCase):
|
||||
req_data = req_blob[ofs_stub:ofs_trailer]
|
||||
req_whole = req_blob[0:ofs_sig]
|
||||
|
||||
if auth_context["auth_level"] >= dcerpc.DCERPC_AUTH_LEVEL_PRIVACY:
|
||||
if auth_context["g_auth_level"] >= dcerpc.DCERPC_AUTH_LEVEL_PRIVACY:
|
||||
# TODO: not yet supported here
|
||||
self.assertTrue(False)
|
||||
elif auth_context["auth_level"] >= dcerpc.DCERPC_AUTH_LEVEL_PACKET:
|
||||
elif auth_context["g_auth_level"] >= dcerpc.DCERPC_AUTH_LEVEL_PACKET:
|
||||
req_sig = auth_context["gensec"].sign_packet(req_data, req_whole)
|
||||
elif auth_context["auth_level"] >= dcerpc.DCERPC_AUTH_LEVEL_CONNECT:
|
||||
elif auth_context["g_auth_level"] >= dcerpc.DCERPC_AUTH_LEVEL_CONNECT:
|
||||
self.assertEqual(auth_context["auth_type"],
|
||||
dcerpc.DCERPC_AUTH_TYPE_NTLMSSP)
|
||||
req_sig = b"\x01" +b"\x00" *15
|
||||
|
Loading…
x
Reference in New Issue
Block a user