From: Greg Hudson Date: Tue, 28 Sep 2010 19:09:11 +0000 (+0000) Subject: Make krb5_dbe_def_search_enctype skip key data entries with invalid X-Git-Tag: krb5-1.9-beta1~72 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=59388bb146c8268f070d93b893e1bc2e96e1e837;p=krb5.git 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 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24370 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/kdb/kdb_default.c b/src/lib/kdb/kdb_default.c index 5ca749e61..18de7c75a 100644 --- a/src/lib/kdb/kdb_default.c +++ b/src/lib/kdb/kdb_default.c @@ -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)