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

ktutil: Print the numeric enctype if krb5_enctype_to_string() fails

Sadly krb5_enctype_to_string() fails when des-cbc-crc encyrption
type is removed, leaving a failure the operate rather than
falling back to anything useful.

So fall back to printing 3 in the absense of anything more
useful.  A future fix could be to hard-code this mapping
in the smb_krb5_enctype_to_string() wrapper.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Aug  6 05:53:44 UTC 2021 on sn-devel-184
This commit is contained in:
Andrew Bartlett 2021-08-02 11:21:51 +12:00 committed by Ralph Boehme
parent 4d44db0208
commit 7e6b818fea

View File

@ -96,11 +96,11 @@ int main (int argc, char **argv)
enctype, enctype,
&enctype_str); &enctype_str);
if (ret) { if (ret) {
smb_krb5_err(mem_ctx, context, 1, ret, "krb5_enctype_to_string"); printf("%s (%d)\n", principal, (int)enctype);
} else {
printf("%s (%s)\n", principal, enctype_str);
} }
printf("%s (%s)\n", principal, enctype_str);
TALLOC_FREE(principal); TALLOC_FREE(principal);
SAFE_FREE(enctype_str); SAFE_FREE(enctype_str);
smb_krb5_kt_free_entry(context, &entry); smb_krb5_kt_free_entry(context, &entry);