]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests/krb5: Add TKT_SIG_SUPPORT environment variable
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 14 Oct 2021 03:58:15 +0000 (16:58 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 14 Oct 2021 18:59:31 +0000 (18:59 +0000)
This lets us indicate that service tickets should be issued with ticket
checksums in the PAC.

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

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/krb5/raw_testcase.py
source4/selftest/tests.py

index 188a54451d3e17cbfa6e74f21247afe51e63eaf7..1f7c51c07a53ba7c348f33d44b3f9b63799f19b6 100644 (file)
@@ -574,6 +574,12 @@ class RawKerberosTest(TestCaseInTempDir):
             kdc_fast_support = '0'
         cls.kdc_fast_support = bool(int(kdc_fast_support))
 
+        tkt_sig_support = samba.tests.env_get_var_value('TKT_SIG_SUPPORT',
+                                                        allow_missing=True)
+        if tkt_sig_support is None:
+            tkt_sig_support = '0'
+        cls.tkt_sig_support = bool(int(tkt_sig_support))
+
     def setUp(self):
         super().setUp()
         self.do_asn1_print = False
index ba8bd2ce0c5d604429b6fe4d144b3de04cbe0e0a..dc51af89d8a566bc1b73c506251d9aca76e47b53 100755 (executable)
@@ -913,48 +913,56 @@ for env in ['fileserver_smb1', 'nt4_member', 'clusteredmember', 'ktest', 'nt4_dc
     planoldpythontestsuite(env, "samba.tests.imports")
 
 have_fast_support = int('SAMBA_USES_MITKDC' in config_hash)
+tkt_sig_support = 0
 planoldpythontestsuite("none", "samba.tests.krb5.kcrypto")
 planoldpythontestsuite("ad_dc_default", "samba.tests.krb5.simple_tests",
                        environ={'SERVICE_USERNAME':'$SERVER',
-                                'FAST_SUPPORT': have_fast_support})
+                                'FAST_SUPPORT': have_fast_support,
+                                'TKT_SIG_SUPPORT': tkt_sig_support})
 planoldpythontestsuite("ad_dc_default:local", "samba.tests.krb5.s4u_tests",
                        environ={'SERVICE_USERNAME':'srv_account',
                                 'SERVICE_PASSWORD':'$PASSWORD',
                                 'FOR_USER':'$USERNAME',
-                                'FAST_SUPPORT': have_fast_support})
+                                'FAST_SUPPORT': have_fast_support,
+                                'TKT_SIG_SUPPORT': tkt_sig_support})
 
 planoldpythontestsuite("ad_dc_default", "samba.tests.dsdb_dns")
 
 planoldpythontestsuite("fl2008r2dc:local", "samba.tests.krb5.xrealm_tests",
-                       environ={'FAST_SUPPORT': have_fast_support})
+                       environ={'FAST_SUPPORT': have_fast_support,
+                                'TKT_SIG_SUPPORT': tkt_sig_support})
 
 planoldpythontestsuite("ad_dc_default", "samba.tests.krb5.test_ccache",
                        environ={
                            'ADMIN_USERNAME': '$USERNAME',
                            'ADMIN_PASSWORD': '$PASSWORD',
                            'STRICT_CHECKING': '0',
-                           'FAST_SUPPORT': have_fast_support
+                           'FAST_SUPPORT': have_fast_support,
+                           'TKT_SIG_SUPPORT': tkt_sig_support
                        })
 planoldpythontestsuite("ad_dc_default", "samba.tests.krb5.test_ldap",
                        environ={
                            'ADMIN_USERNAME': '$USERNAME',
                            'ADMIN_PASSWORD': '$PASSWORD',
                            'STRICT_CHECKING': '0',
-                           'FAST_SUPPORT': have_fast_support
+                           'FAST_SUPPORT': have_fast_support,
+                           'TKT_SIG_SUPPORT': tkt_sig_support
                        })
 planoldpythontestsuite("ad_dc_default", "samba.tests.krb5.test_rpc",
                        environ={
                            'ADMIN_USERNAME': '$USERNAME',
                            'ADMIN_PASSWORD': '$PASSWORD',
                            'STRICT_CHECKING': '0',
-                           'FAST_SUPPORT': have_fast_support
+                           'FAST_SUPPORT': have_fast_support,
+                           'TKT_SIG_SUPPORT': tkt_sig_support
                        })
 planoldpythontestsuite("ad_dc_smb1", "samba.tests.krb5.test_smb",
                        environ={
                            'ADMIN_USERNAME': '$USERNAME',
                            'ADMIN_PASSWORD': '$PASSWORD',
                            'STRICT_CHECKING': '0',
-                           'FAST_SUPPORT': have_fast_support
+                           'FAST_SUPPORT': have_fast_support,
+                           'TKT_SIG_SUPPORT': tkt_sig_support
                        })
 
 for env in ["ad_dc", smbv1_disabled_testenv]:
@@ -1528,7 +1536,8 @@ for env in ["fl2008r2dc", "fl2003dc"]:
                                'ADMIN_USERNAME': '$USERNAME',
                                'ADMIN_PASSWORD': '$PASSWORD',
                                'STRICT_CHECKING': '0',
-                               'FAST_SUPPORT': have_fast_support
+                               'FAST_SUPPORT': have_fast_support,
+                               'TKT_SIG_SUPPORT': tkt_sig_support
                            })
 
 
@@ -1550,7 +1559,8 @@ planpythontestsuite("ad_dc", "samba.tests.krb5.as_canonicalization_tests",
                        environ={
                            'ADMIN_USERNAME': '$USERNAME',
                            'ADMIN_PASSWORD': '$PASSWORD',
-                           'FAST_SUPPORT': have_fast_support
+                           'FAST_SUPPORT': have_fast_support,
+                           'TKT_SIG_SUPPORT': tkt_sig_support
                        })
 planpythontestsuite("ad_dc", "samba.tests.krb5.compatability_tests",
                     environ={
@@ -1558,9 +1568,11 @@ planpythontestsuite("ad_dc", "samba.tests.krb5.compatability_tests",
                         'ADMIN_PASSWORD': '$PASSWORD',
                         'STRICT_CHECKING': '0',
                         'FAST_SUPPORT': have_fast_support,
+                        'TKT_SIG_SUPPORT': tkt_sig_support
                     })
 planpythontestsuite("ad_dc", "samba.tests.krb5.kdc_tests",
-                    environ={'FAST_SUPPORT': have_fast_support})
+                    environ={'FAST_SUPPORT': have_fast_support,
+                             'TKT_SIG_SUPPORT': tkt_sig_support})
 planpythontestsuite(
     "ad_dc",
     "samba.tests.krb5.kdc_tgs_tests",
@@ -1568,7 +1580,8 @@ planpythontestsuite(
         'ADMIN_USERNAME': '$USERNAME',
         'ADMIN_PASSWORD': '$PASSWORD',
         'STRICT_CHECKING': '0',
-        'FAST_SUPPORT': have_fast_support
+        'FAST_SUPPORT': have_fast_support,
+        'TKT_SIG_SUPPORT': tkt_sig_support
     })
 planpythontestsuite(
     "ad_dc",
@@ -1577,7 +1590,8 @@ planpythontestsuite(
         'ADMIN_USERNAME': '$USERNAME',
         'ADMIN_PASSWORD': '$PASSWORD',
         'STRICT_CHECKING': '0',
-        'FAST_SUPPORT': have_fast_support
+        'FAST_SUPPORT': have_fast_support,
+        'TKT_SIG_SUPPORT': tkt_sig_support
     })
 planpythontestsuite(
     "ad_dc",
@@ -1586,7 +1600,8 @@ planpythontestsuite(
         'ADMIN_USERNAME': '$USERNAME',
         'ADMIN_PASSWORD': '$PASSWORD',
         'STRICT_CHECKING': '0',
-        'FAST_SUPPORT': have_fast_support
+        'FAST_SUPPORT': have_fast_support,
+        'TKT_SIG_SUPPORT': tkt_sig_support
     })
 
 for env in [