From 521af89ada0d14f3de4a9207616d21f6e690b171 Mon Sep 17 00:00:00 2001 From: Richard Basch Date: Thu, 9 May 1996 15:57:58 +0000 Subject: [PATCH] Don't skip keytab entries with kvno=0 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7949 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/keytab/file/ChangeLog | 5 +++++ src/lib/krb5/keytab/file/ktf_g_ent.c | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/lib/krb5/keytab/file/ChangeLog b/src/lib/krb5/keytab/file/ChangeLog index 385e254c8..3957f037f 100644 --- a/src/lib/krb5/keytab/file/ChangeLog +++ b/src/lib/krb5/keytab/file/ChangeLog @@ -1,3 +1,8 @@ +Thu May 9 03:05:51 1996 Richard Basch + + * ktf_g_ent.c (krb5_ktfile_get_entry): don't skip over keytab + entries with kvno=0. + Tue Mar 19 22:28:43 1996 Richard Basch * ktf_g_ent.c (krb5_ktfile_get_entry): all des enctypes are equivalent diff --git a/src/lib/krb5/keytab/file/ktf_g_ent.c b/src/lib/krb5/keytab/file/ktf_g_ent.c index 9a76ce4cd..4805d5c69 100644 --- a/src/lib/krb5/keytab/file/ktf_g_ent.c +++ b/src/lib/krb5/keytab/file/ktf_g_ent.c @@ -81,16 +81,17 @@ krb5_ktfile_get_entry(context, id, principal, kvno, enctype, entry) (entry_type == enctype))&& krb5_principal_compare(context, principal, new_entry.principal)) { if (kvno == IGNORE_VNO) { - if (cur_entry.vno < new_entry.vno) { + if (! cur_entry.principal || + (cur_entry.vno < new_entry.vno)) + { krb5_kt_free_entry(context, &cur_entry); - cur_entry = new_entry; + cur_entry = new_entry; } } else { if (new_entry.vno == kvno) { -krb5_kt_free_entry(context, &cur_entry); - - cur_entry = new_entry; - break; + krb5_kt_free_entry(context, &cur_entry); + cur_entry = new_entry; + break; } } } else { -- 2.26.2