pull up r24370 from trunk
authorTom Yu <tlyu@mit.edu>
Fri, 15 Oct 2010 21:42:29 +0000 (21:42 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 15 Oct 2010 21:42:29 +0000 (21:42 +0000)
 ------------------------------------------------------------------------
 r24370 | ghudson | 2010-09-28 15:09:11 -0400 (Tue, 28 Sep 2010) | 9 lines

 ticket: 6790
 target_version: 1.8.4
 tags: pullup

 Make krb5_dbe_def_search_enctype skip key data entries with invalid
 enctypes instead of erroring out on them.  We had this behavior prior
 to 1.8 (more by accident than by design), but it changed as a
 side-effect of r23599.

ticket: 6790
target_version: 1.8.4
version_fixed: 1.8.4
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-8@24461 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/kdb_default.c

index 225a5074e187dc4e4967b261dfb9cf5c2bbbe4b4..dc4f42c0e006a829350103b2be482efe99632f49 100644 (file)
@@ -91,12 +91,10 @@ krb5_dbe_def_search_enctype(kcontext, dbentp, start, ktype, stype, kvno, kdatap)
 
         /* Match this entry against the arguments. */
         if (ktype != -1) {
-            if ((ret = krb5_c_enctype_compare(kcontext, (krb5_enctype) ktype,
-                                              dbentp->key_data[i].key_data_type[0],
-                                              &similar)))
-
-                return(ret);
-            if (!similar)
+            ret = krb5_c_enctype_compare(kcontext, (krb5_enctype) ktype,
+                                         dbentp->key_data[i].key_data_type[0],
+                                         &similar);
+            if (ret != 0 || !similar)
                 continue;
         }
         if (stype >= 0 && db_stype != stype)