From bec7406d6738c0b760d47968ac6029351dd5acb4 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 11 Jul 1995 17:06:21 +0000 Subject: [PATCH] If the key version number is specified, check to make sure that the entry has the correct key version number. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6276 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/keytab/file/ChangeLog | 6 ++++++ src/lib/krb5/keytab/file/ktf_g_ent.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/lib/krb5/keytab/file/ChangeLog b/src/lib/krb5/keytab/file/ChangeLog index 8de097a14..16ec9bf5b 100644 --- a/src/lib/krb5/keytab/file/ChangeLog +++ b/src/lib/krb5/keytab/file/ChangeLog @@ -1,3 +1,9 @@ +Wed Jun 28 12:05:34 1995 + + * ktf_g_ent.c (krb5_ktfile_get_entry): If the key version number + is specified, check to make sure that the entry has the + correct key version number. + Fri Jun 9 19:34:23 1995 * configure.in: Remove standardized set of autoconf macros, which diff --git a/src/lib/krb5/keytab/file/ktf_g_ent.c b/src/lib/krb5/keytab/file/ktf_g_ent.c index a296720ce..f05f0bd48 100644 --- a/src/lib/krb5/keytab/file/ktf_g_ent.c +++ b/src/lib/krb5/keytab/file/ktf_g_ent.c @@ -63,8 +63,10 @@ krb5_ktfile_get_entry(context, id, principal, kvno, keytype, entry) cur_entry = new_entry; } } else { - cur_entry = new_entry; - break; + if (new_entry.vno == kvno) { + cur_entry = new_entry; + break; + } } } else { krb5_kt_free_entry(context, &new_entry); -- 2.26.2