36 lines
1.1 KiB
Diff
36 lines
1.1 KiB
Diff
From 214a61d2169329106da654c06a5faaeaf645852d Mon Sep 17 00:00:00 2001
|
|
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
Date: Fri, 22 Jan 2016 15:04:48 +0100
|
|
Subject: [PATCH 73/86] DEBUG: Ignore ENOENT for change owner of log files
|
|
|
|
Resolves:
|
|
https://fedorahosted.org/sssd/ticket/2493
|
|
|
|
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
(cherry picked from commit cbb04b9439d73fff027e193093a49cdac3cdb499)
|
|
---
|
|
src/util/debug.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/src/util/debug.c b/src/util/debug.c
|
|
index d10b456acd14f32590e8b4111596f95a555ac828..a014bc3850641ad1f37c72df5a6181fed8391cfb 100644
|
|
--- a/src/util/debug.c
|
|
+++ b/src/util/debug.c
|
|
@@ -331,6 +331,13 @@ int chown_debug_file(const char *filename,
|
|
free(logpath);
|
|
if (ret != 0) {
|
|
ret = errno;
|
|
+ if (ret == ENOENT) {
|
|
+ /* Log does not exist. We might log to journald
|
|
+ * or starting for first time.
|
|
+ * It's not a failure. */
|
|
+ return EOK;
|
|
+ }
|
|
+
|
|
DEBUG(SSSDBG_FATAL_FAILURE, "chown failed for [%s]: [%d]\n",
|
|
log_file, ret);
|
|
return ret;
|
|
--
|
|
2.5.0
|
|
|