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

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>
This commit is contained in:
Joseph Sutton 2021-07-27 16:25:39 +12:00 committed by Andrew Bartlett
parent dbe98005d5
commit 7a27b75621

View File

@ -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')