summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJoseph Sutton <josephsutton@catalyst.net.nz>2021-07-27 16:25:39 +1200
committerAndrew Bartlett <abartlet@samba.org>2021-08-18 22:28:34 +0000
commit7a27b75621908a4a6449efaecb54eb20fa45aca0 (patch)
tree9229173687c3827e2a3f197ca051e3587b7d62f3 /python
parentdbe98005d5873440063b91e56679937149535be7 (diff)
downloadsamba-7a27b75621908a4a6449efaecb54eb20fa45aca0.tar.gz
samba-7a27b75621908a4a6449efaecb54eb20fa45aca0.tar.bz2
samba-7a27b75621908a4a6449efaecb54eb20fa45aca0.zip
tests/krb5: Check sname is krbtgt for FAST generic error
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/krb5/raw_testcase.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/python/samba/tests/krb5/raw_testcase.py b/python/samba/tests/krb5/raw_testcase.py
index 8351de1e6e3..77b682e57ea 100644
--- a/python/samba/tests/krb5/raw_testcase.py
+++ b/python/samba/tests/krb5/raw_testcase.py
@@ -2146,6 +2146,8 @@ class RawKerberosTest(TestCaseInTempDir):
expected_sname = kdc_exchange_dict['expected_sname']
expected_error_mode = kdc_exchange_dict['expected_error_mode']
+ sent_fast = self.sent_fast(kdc_exchange_dict)
+
self.assertElementEqual(rep, 'pvno', 5)
self.assertElementEqual(rep, 'msg-type', KRB_ERROR)
self.assertElementEqual(rep, 'error-code', expected_error_mode)
@@ -2159,7 +2161,11 @@ class RawKerberosTest(TestCaseInTempDir):
self.assertElementMissing(rep, 'crealm')
self.assertElementMissing(rep, 'cname')
self.assertElementEqualUTF8(rep, 'realm', expected_srealm)
- self.assertElementEqualPrincipal(rep, 'sname', expected_sname)
+ if sent_fast and expected_error_mode == KDC_ERR_GENERIC:
+ self.assertElementEqualPrincipal(rep, 'sname',
+ self.get_krbtgt_sname())
+ else:
+ self.assertElementEqualPrincipal(rep, 'sname', expected_sname)
self.assertElementMissing(rep, 'e-text')
if expected_error_mode == KDC_ERR_GENERIC:
self.assertElementMissing(rep, 'e-data')