[SSSD] [PATCH] DEBUG: Preventing chown_debug_file if journald on

Lukas Slebodnik lslebodn at redhat.com
Fri Sep 11 09:02:01 UTC 2015


On (10/09/15 17:08), Petr Cech wrote:
>Hi,
>patch for
>https://fedorahosted.org/sssd/ticket/2493
>is attached.
>Petr

>From 1d87d8dd390c229ac603569a604d9cca656c3f1b Mon Sep 17 00:00:00 2001
>From: Petr Cech <pcech at redhat.com>
>Date: Thu, 10 Sep 2015 10:05:59 -0400
>Subject: [PATCH] DEBUG: Preventing chown_debug_file if journald on
>
>There is function chown_debug_file() which didn't check
>if the SSSD is compiled with journald support.
>
>This patch add simple checking of this state.
>
>Resolves:
>https://fedorahosted.org/sssd/ticket/2493
>---
> src/util/debug.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
>diff --git a/src/util/debug.c b/src/util/debug.c
>index 69df54386101973548108c3194a1bfd111f046f0..70d136dbfc996a4bcbd246861c55c6eba7a5b65b 100644
>--- a/src/util/debug.c
>+++ b/src/util/debug.c
>@@ -316,6 +316,8 @@ int chown_debug_file(const char *filename,
>     const char *log_file;
>     errno_t ret;
> 
>+#ifndef WITH_JOURNALD
>+
>     if (filename == NULL) {
>         log_file = debug_log_file;
>     } else {
>@@ -336,6 +338,8 @@ int chown_debug_file(const char *filename,
>         return ret;
>     }
> 
>+#endif /* WITH_JOURNALD */
>+

I do not understand how is the function chown_debug_file related to journald.
sssd can be compiled with journald support and in the same time can log to the
files. This is a default for fedora and rehl7.

If someone want to enable logging all messages to journald then it is required
manula change to the file /etc/systemd/system/sssd.service.d/journal.conf


LS


More information about the sssd-devel mailing list