From c4915fe69e01021ed5faf77ae5693846f2ed6dd0 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 23 2020 06:09:30 +0000 Subject: Apply patch 0002-library-return-error-if-no-matching-key-was-found.patch patch_name: 0002-library-return-error-if-no-matching-key-was-found.patch present_in_specfile: true location_in_specfile: 34 --- diff --git a/library/adkrb5.c b/library/adkrb5.c index 033c181..7f77373 100644 --- a/library/adkrb5.c +++ b/library/adkrb5.c @@ -298,11 +298,10 @@ _adcli_krb5_keytab_copy_entries (krb5_context k5, code = _adcli_krb5_get_keyblock (k5, keytab, &entry.key, match_enctype_and_kvno, &closure); - if (code != 0) { - return code; + if (code != 0 || closure.matched == 0) { + return code != 0 ? code : ENOKEY; } - entry.principal = principal; entry.vno = kvno;