From fd0fd487df3793b1caa3a2706866d222869e6eae Mon Sep 17 00:00:00 2001 From: Rafael Guterres Jeffman Date: Thu, 27 Apr 2023 10:46:06 -0300 Subject: [PATCH] Fix "no entry" condition when searching PAC info Fix Covscan-discovered DEADCODE block when searching for PAC info, caused by a wrong condition being evaluated when entry is a trusted domain object. Fixes: https://pagure.io/freeipa/issue/9368 Signed-off-by: Rafael Guterres Jeffman Reviewed-By: Rob Crittenden Reviewed-By: Alexander Bokovoy --- daemons/ipa-kdb/ipa_kdb_mspac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/ipa-kdb/ipa_kdb_mspac.c b/daemons/ipa-kdb/ipa_kdb_mspac.c index 476d1cb55..8da754387 100644 --- a/daemons/ipa-kdb/ipa_kdb_mspac.c +++ b/daemons/ipa-kdb/ipa_kdb_mspac.c @@ -1086,7 +1086,7 @@ krb5_error_code ipadb_get_pac(krb5_context kcontext, } sentry = ldap_first_entry(ipactx->lcontext, sresults); - if (!lentry) { + if (!sentry) { kerr = ENOENT; goto done; }