From 59388bb146c8268f070d93b893e1bc2e96e1e837 Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Tue, 28 Sep 2010 19:09:11 +0000 Subject: [PATCH] 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 --- src/lib/kdb/kdb_default.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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) -- 2.26.2