tests/krb5: Improve edata checking
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Thu, 4 May 2023 02:55:36 +0000 (14:55 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 18 May 2023 01:03:37 +0000 (01:03 +0000)
commit18b24f9572877b295a863432daaf458eb72562d0
treeb5f99c2f57afffdbeca897aa609e7fefed4d6efd
parent3063abbfb0aaee65b80bd185d66923c148a861b4
tests/krb5: Improve edata checking

Instead of guessing based on a heuristic whether we have KERB_ERROR_DATA
or METHOD_DATA in the ‘e-data’ field, decode it first as KERB_ERROR_DATA
and fall back to METHOD_DATA if that fails.

The environment variable EXPECT_NT_STATUS indicates that the KDC
supports returning a status code in the e-data field.

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