]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2021-23192: python/tests/dcerpc: let generate_request_auth() use g_auth_level...
authorStefan Metzmacher <metze@samba.org>
Tue, 17 Nov 2020 08:50:58 +0000 (09:50 +0100)
committerJule Anger <janger@samba.org>
Tue, 9 Nov 2021 19:45:34 +0000 (19:45 +0000)
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>
python/samba/tests/dcerpc/raw_testcase.py

index ed77d329cd5da901266e18bf88f0fdceaca0a2cb..53f7fa0a2a8a6ee79f8c893fdba5afce7e5a2e8f 100644 (file)
@@ -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