]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
The logic of the krb5_db_def_fetch_mkey_keytab() was off a bit when checking the...
authorWill Fiveash <will.fiveash@oracle.com>
Fri, 27 Jun 2008 22:03:37 +0000 (22:03 +0000)
committerWill Fiveash <will.fiveash@oracle.com>
Fri, 27 Jun 2008 22:03:37 +0000 (22:03 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/mkey_keytab@20490 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/kdb_default.c

index 2d265a0e7b2001199e71f35728c553db213fd03e..4d1b9758051f648a2cf944d513895339d268b594 100644 (file)
@@ -323,9 +323,11 @@ krb5_db_def_fetch_mkey_keytab(  krb5_context   context,
 
     while ((retval = krb5_kt_next_entry(context, kt, &kt_ent, &cursor)) == 0) {
 
-        if ((key->enctype != ENCTYPE_UNKNOWN && key->enctype != kt_ent.key.enctype) ||
-            (kvno != NULL && *kvno != IGNORE_VNO && *kvno != kt_ent.vno)) {
-
+        if (key->enctype != ENCTYPE_UNKNOWN && key->enctype != kt_ent.key.enctype) {
+            krb5_kt_free_entry(context, &kt_ent);
+            continue;
+        }
+        if (kvno != NULL && *kvno != IGNORE_VNO && *kvno != kt_ent.vno) {
             krb5_kt_free_entry(context, &kt_ent);
             continue;
         }