1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-10 01:18:15 +03:00

tests/krb5: Add TKT_SIG_SUPPORT environment variable

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>
This commit is contained in:
Joseph Sutton 2021-10-14 16:58:15 +13:00 committed by Andrew Bartlett
parent 40e5db4aab
commit ae2c57fb03
2 changed files with 34 additions and 13 deletions

View 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

View File

@ -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 [