]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Allow get_tgt() to request including or omitting a PAC
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Fri, 15 Oct 2021 01:26:40 +0000 (14:26 +1300)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Oct 2021 22:37:10 +0000 (22:37 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14642
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14881

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit e086c6193f6da6fcb5d0bcada2199e9bc7ad25f5)

python/samba/tests/krb5/kdc_base_test.py

index 87160f675ae846477586b176ee17f55a0033e881..1fc15315b0b08655aba49721391772ba4457a67e 100644 (file)
@@ -1306,9 +1306,9 @@ class KDCBaseTest(RawKerberosTest):
 
     def get_tgt(self, creds, to_rodc=False, kdc_options=None,
                 expected_flags=None, unexpected_flags=None,
-                fresh=False):
+                pac_request=True, expect_pac=True, fresh=False):
         user_name = creds.get_username()
-        cache_key = (user_name, to_rodc, kdc_options)
+        cache_key = (user_name, to_rodc, kdc_options, pac_request)
 
         if not fresh:
             tgt = self.tkt_cache.get(cache_key)
@@ -1363,7 +1363,7 @@ class KDCBaseTest(RawKerberosTest):
             kdc_options=kdc_options,
             preauth_key=None,
             ticket_decryption_key=ticket_decryption_key,
-            pac_request=True,
+            pac_request=pac_request,
             pac_options=pac_options,
             to_rodc=to_rodc)
         self.check_pre_authentication(rep)
@@ -1405,8 +1405,9 @@ class KDCBaseTest(RawKerberosTest):
             kdc_options=kdc_options,
             preauth_key=preauth_key,
             ticket_decryption_key=ticket_decryption_key,
-            pac_request=True,
+            pac_request=pac_request,
             pac_options=pac_options,
+            expect_pac=expect_pac,
             to_rodc=to_rodc)
         self.check_as_reply(rep)