Blame SOURCES/0010-krb5-Silence-an-error-message-if-no-cache-entries-ha.patch

5fca41
From 23fb7ea2f98c08a7df21b68bf96ddfe982fa284e Mon Sep 17 00:00:00 2001
5fca41
From: Jakub Hrozek <jhrozek@redhat.com>
5fca41
Date: Mon, 25 Mar 2019 10:17:39 +0100
5fca41
Subject: [PATCH] krb5: Silence an error message if no cache entries have
5fca41
 ccache stored but renewal is enabled
5fca41
5fca41
If no user entries had the ccacheFile attribute, the code would treat
5fca41
ENOENT as an error and print a CRIT-level debug message.
5fca41
5fca41
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
5fca41
(cherry picked from commit 22fc051df8bd1a9ec9e22aac85659d1da3bdbaec)
5fca41
---
5fca41
 src/providers/krb5/krb5_renew_tgt.c | 4 +++-
5fca41
 1 file changed, 3 insertions(+), 1 deletion(-)
5fca41
5fca41
diff --git a/src/providers/krb5/krb5_renew_tgt.c b/src/providers/krb5/krb5_renew_tgt.c
5fca41
index c7e2bd91f..8b2159e92 100644
5fca41
--- a/src/providers/krb5/krb5_renew_tgt.c
5fca41
+++ b/src/providers/krb5/krb5_renew_tgt.c
5fca41
@@ -413,7 +413,9 @@ static errno_t check_ccache_files(struct renew_tgt_ctx *renew_tgt_ctx)
5fca41
     ret = sysdb_search_entry(tmp_ctx, renew_tgt_ctx->be_ctx->domain->sysdb, base_dn,
5fca41
                              LDB_SCOPE_SUBTREE, ccache_filter, ccache_attrs,
5fca41
                              &msgs_count, &msgs);
5fca41
-    if (ret != EOK) {
5fca41
+    if (ret == ENOENT) {
5fca41
+        msgs_count = 0; /* Fall through */
5fca41
+    } else if (ret != EOK) {
5fca41
         DEBUG(SSSDBG_CRIT_FAILURE, "sysdb_search_entry failed.\n");
5fca41
         goto done;
5fca41
     }
5fca41
-- 
5fca41
2.19.1
5fca41