sssd/0002-UTILS-reduce-log-level-if-sss_krb5_touch_config-fail.patch

35 lines
1.2 KiB
Diff
Raw Permalink Normal View History

From 00aadc78e8c003790b7b07baf074beacd19e1df5 Mon Sep 17 00:00:00 2001
From: Alexey Tikhonov <atikhono@redhat.com>
Date: Wed, 11 Dec 2024 16:10:23 +0100
Subject: [PATCH] UTILS: reduce log level if `sss_krb5_touch_config()` fails
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is a fix of fc5c1a1af5d868a34a687550af1e31a17576ad25 -
when `times` argument is 'NULL' return code in case of failing
DAC checks is 'EACCESS', not 'EPERM'
Reviewed-by: Alejandro López <allopez@redhat.com>
(cherry picked from commit 5094a3d9900fa09642b7370b9f6dffeb4db95962)
---
src/util/domain_info_utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/util/domain_info_utils.c b/src/util/domain_info_utils.c
index caf563f86..79400e901 100644
--- a/src/util/domain_info_utils.c
+++ b/src/util/domain_info_utils.c
@@ -283,7 +283,7 @@ sss_krb5_touch_config(void)
ret = utime(config, NULL);
if (ret == -1) {
ret = errno;
- DEBUG(ret == EPERM ? SSSDBG_MINOR_FAILURE : SSSDBG_CRIT_FAILURE,
+ DEBUG(ret == EACCES ? SSSDBG_MINOR_FAILURE : SSSDBG_CRIT_FAILURE,
"Unable to change mtime of \"%s\" [%d]: %s\n",
config, ret, strerror(ret));
}
--
2.47.0