+Thu Jan 25 15:52:34 1996 Sam Hartman <hartmans@tertius.mit.edu>
+
+ * ktf_g_ent.c (krb5_ktfile_get_entry): Match against enctype.
+
Fri Jan 5 04:50:41 1996 Ezra Peisach (epeisach@kangaroo.mit.edu)
* ser_ktf.c (krb5_ktf_keytab_internalize): Take care of gcc
if ((kerror = krb5_ktfileint_read_entry(context, id, &new_entry)))
break;
- if (krb5_principal_compare(context, principal, new_entry.principal)) {
+ if (((enctype == IGNORE_ENCTYPE)||
+ (new_entry.key.enctype == enctype))&&
+ krb5_principal_compare(context, principal, new_entry.principal)) {
if (kvno == IGNORE_VNO) {
if (cur_entry.vno < new_entry.vno) {
- krb5_kt_free_entry(context, &cur_entry);
+ krb5_kt_free_entry(context, &cur_entry);
cur_entry = new_entry;
}
} else {
if (new_entry.vno == kvno) {
+krb5_kt_free_entry(context, &cur_entry);
+
cur_entry = new_entry;
break;
}
* Constants
*/
#define IGNORE_VNO 0
+#define IGNORE_ENCTYPE 0
#define KRB5_KT_VNO_1 0x0501 /* krb v5, keytab version 1 (DCE compat) */
#define KRB5_KT_VNO 0x0502 /* krb v5, keytab version 2 (standard) */