1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

tests/krb5: Fix bits_to_etypes() to not fail on Resource SID compression bit

It's not an encryption type bit, so we should ignore it here.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2022-11-03 14:46:38 +13:00 committed by Andrew Bartlett
parent 90f39b6959
commit 6674f67537

View File

@ -370,6 +370,9 @@ class KerberosCredentials(Credentials):
security.KERB_ENCTYPE_COMPOUND_IDENTITY_SUPPORTED |
security.KERB_ENCTYPE_CLAIMS_SUPPORTED)
non_etype_bits = fast_supported_bits | (
security.KERB_ENCTYPE_RESOURCE_SID_COMPRESSION_DISABLED)
def __init__(self):
super(KerberosCredentials, self).__init__()
all_enc_types = 0
@ -431,7 +434,7 @@ class KerberosCredentials(Credentials):
bits &= ~bit
etypes += (etype,)
bits &= ~cls.fast_supported_bits
bits &= ~cls.non_etype_bits
if bits != 0:
raise ValueError(f'Unsupported etype bits: {bits}')