-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 10/27/2015 05:33 PM, Lukas Slebodnik wrote:
On (27/10/15 09:48), Stephen Gallagher wrote:
> We get an error message if we start up SSSD and the debug log
> does not yet exist.
> From 53592734f73c50029fa573b9bc070437304ea489 Mon Sep 17 00:00:00
> 2001 From: Stephen Gallagher <sgallagh(a)redhat.com> Date: Tue, 27
> Oct 2015 09:39:01 -0400 Subject: [PATCH] DEBUG: Don't error on
> chown of nonexistent file
>
> We get an error message if we start up SSSD and the debug log
> does not yet exist. --- src/util/debug.c | 9 ++++++--- 1 file
> changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/src/util/debug.c b/src/util/debug.c index
> a8eea32740155ec3daf6be71ef9a8af6592f74a9..729d9f99d35c7208950a9a1af1f
df3942b23a147
> 100644 --- a/src/util/debug.c +++ b/src/util/debug.c @@ -331,13
> +331,16 @@ int chown_debug_file(const char *filename,
>
> ret = chown(logpath, uid, gid); free(logpath); if (ret != 0) {
> ret = errno; - DEBUG(SSSDBG_FATAL_FAILURE, "chown
> failed for [%s]: [%d]\n", - log_file, ret); -
> return ret; + if (ret != ENOENT) { + /*
> Don't write an error message for a nonexistent file */ +
> DEBUG(SSSDBG_FATAL_FAILURE, "chown failed for [%s]: [%d]\n", +
> log_file, ret); + return ret; + }
Patch make sense, But I cannot see an error message even with empty
directory /var/log/sssd. Do you have an idea why?
Start the sssd in interactive mode instead of sending to files and it
will become clear :)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iEYEARECAAYFAlYwx58ACgkQeiVVYja6o6NxwACdFgv3zeVpmh7CodmER0Q0t7/u
OpUAoKpHFcXaNX6KhVrM579GaePX/uyz
=dIVo
-----END PGP SIGNATURE-----