From 8443c296ca3f628e600b9de08cd4a573b1e79675 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Fri, 15 Oct 2010 21:42:29 +0000 Subject: [PATCH] pull up r24370 from trunk ------------------------------------------------------------------------ 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 | 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 225a5074e..dc4f42c0e 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