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

Petr Cech pcech at redhat.com
Wed Oct 21 14:31:36 UTC 2015


On 10/05/2015 10:21 AM, Jakub Hrozek wrote:
> On Fri, Sep 25, 2015 at 02:05:14PM +0200, Petr Cech wrote:
>> ping
>>
>
> I can't start sssd as a service with this patch applied after switching
> from root to non-root:
>      1) add user=sssd to the [sssd] section
>      2) chown root.root /var/log/sssd/*.log
>      3) systemctl start sssd
>
> I must admit I no longer remember what the irritating messages the
> ticket talks about were. Was is that the file is not there if only
> journald support is used? Would it make more sense to ignore ENOENT
> errors in that case (or even always) ?

Hi Jakub,

ticket says "chown_debug_file() is called unconditionally and it does 
not make any check if debug to files is active or not. This might cause 
irritating error messages e.g. when journald is used."

I must admit I didn't check my patch currently. But I tried to reproduce 
your problem with starting SSSD after switching root to non-root user. I 
think I catch the problem.

I tried it (switch the user) without my patch applied---and the result 
was the same, it couldn't start. Problem is in step number 2, you wrote 
root instead of sssd.

I tried full installation now (make, create rpm, install from rpm) and 
it is possible to run SSSD without and with my patch applied.

Maybe this could help to find short way like in step 2:

[root at albireo sssd]# ll /var/lib/
drwxr-xr-x. 8 root          root            80 Oct 21 10:15 sss

[root at albireo sssd]# ll /var/lib/sss
drwx------. 2 sssd sssd 4096 Oct 21 10:25 db
drwxr-xr-x. 2 sssd sssd    6 Oct 21 10:15 gpo_cache
drwx------. 2 sssd sssd    6 Oct 21 10:15 keytabs
drwxr-xr-x. 2 sssd sssd   48 Oct 21 10:25 mc
drwxr-xr-x. 3 sssd sssd   40 Oct 21 10:25 pipes
drwxr-xr-x. 3 sssd sssd   27 Oct 21 10:25 pubconf

[root at albireo sssd]# ll /var/log
drwxr-x---. 2 sssd sssd                    4096 Oct 21 10:15 sssd

Regards

Petr


More information about the sssd-devel mailing list