From: Richard Basch Date: Thu, 9 May 1996 15:57:58 +0000 (+0000) Subject: Don't skip keytab entries with kvno=0 X-Git-Tag: krb5-1.0-beta6~120 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=521af89ada0d14f3de4a9207616d21f6e690b171;p=krb5.git Don't skip keytab entries with kvno=0 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7949 dc483132-0cff-0310-8789-dd5450dbe970 --- 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 {