From 0071c47e97514e8615edc2fa8e12c65ec5ee0171 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Sat, 8 Dec 2001 02:00:19 +0000 Subject: [PATCH] * ktf_g_ent.c (krb5_ktfile_get_entry): Coerce enctype for now to restore 1.0.x enctype similarity behavior. [pullup from 1.2.3] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14060 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/keytab/file/ChangeLog | 5 +++++ src/lib/krb5/keytab/file/ktf_g_ent.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/src/lib/krb5/keytab/file/ChangeLog b/src/lib/krb5/keytab/file/ChangeLog index 199cf0c02..93060ffec 100644 --- a/src/lib/krb5/keytab/file/ChangeLog +++ b/src/lib/krb5/keytab/file/ChangeLog @@ -1,3 +1,8 @@ +2001-11-19 Tom Yu + + * ktf_g_ent.c (krb5_ktfile_get_entry): Coerce enctype for now to + restore 1.0.x enctype similarity behavior. + 2001-10-09 Ken Raeburn * ktfile.h, ser_ktf.c: Make prototypes unconditional. diff --git a/src/lib/krb5/keytab/file/ktf_g_ent.c b/src/lib/krb5/keytab/file/ktf_g_ent.c index b45ab6fd7..159c95ca8 100644 --- a/src/lib/krb5/keytab/file/ktf_g_ent.c +++ b/src/lib/krb5/keytab/file/ktf_g_ent.c @@ -81,6 +81,14 @@ krb5_ktfile_get_entry(context, id, principal, kvno, enctype, entry) krb5_kt_free_entry(context, &new_entry); continue; } + /* + * Coerce the enctype of the output keyblock in case we + * got an inexact match on the enctype; this behavior will + * go away when the key storage architecture gets + * redesigned for 1.3. + */ + new_entry.key.enctype = enctype; + } /* if the principal isn't the one requested, free new_entry -- 2.26.2