[SSSD] Config file ownership and cwrap tests

Lukas Slebodnik lslebodn at redhat.com
Tue Jan 13 13:09:21 UTC 2015


On (13/01/15 14:31), Nikolai Kondrashov wrote:
>Hi everyone,
>
>I have a bit of a chicken/egg problem with implementing cwrap tests.
>
>Sssd currently requires the config file to belong to root. However, that is
>not possible to arrange when running under a regular user, in cwrap tests.
>Even though uid_wrapper fakes running under root, the created files still
>belong to the real user.
>
>I see two ways out of this: either run under fakeroot, or allow the config
>file to (also?) belong to the user sssd is configured to run under (target
>user).
>
>While fakeroot will likely work, to me it seems like sweeping the problem
>under the rug. The second option seems a bit more natural, especially
>considering that the CDB file is explicitly chown'ed to the target user,
>anyway.
>
>Now, since the target user can be configured both at the build time *and* in
>the configuration file itself, we'll need to verify file ownership *after*
>reading it. Or, can we maybe move user specification to command-line option?
>
>What do you think?
>
We will use lot of "hacks" with cwrap tests. So we can use yet another.
We can mock(LD_PRELOAD own version) ini_config_access_check that it will return
EOK for sssd.conf although owner is not root.

LS



More information about the sssd-devel mailing list