[systemd-devel] [PATCH] sysusers: allow overrides in /etc and /run

Colin Guthrie gmane at colin.guthr.ie
Thu Jul 10 06:41:14 PDT 2014


'Twas brillig, and Zbigniew Jędrzejewski-Szmek at 10/07/14 13:51 did
gyre and gimble:
> An administrator might want to block a certain sysusers config file from
> being executed, e.g. to block the creation of a certain user.
> ---
>  src/sysusers/sysusers.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c
> index 129493a1e7..68c552d24a 100644
> --- a/src/sysusers/sysusers.c
> +++ b/src/sysusers/sysusers.c
> @@ -62,6 +62,8 @@ typedef struct Item {
>  static char *arg_root = NULL;
>  
>  static const char conf_file_dirs[] =
> +        "/etc/sysusers.d\0"
> +        "/run/sysusers.d\0"
>          "/usr/local/lib/sysusers.d\0"
>          "/usr/lib/sysusers.d\0"
>  #ifdef HAVE_SPLIT_USR

I guess this is probably OK, but isn't it a bit counter intuitive? I
mean one of the reasons for sysuser is due to /etc/ being bootstrapped.
In this case I'd have thought that looking in /etc/ is a bit weird.

What if you create a tmpfiles snippet to create a
/etc/sysusers.d/foo.conf file, does that mean we have to run tmpfiles
before sysusers?

But then I do accept that when sysusers is used for non-bootstrapping
(i.e. just instead of the %pre useradd in RPM scripts and the like) it
might be something an administrator would want to override. That said,
AFAIK, there is no way to override this current with rpm scripts, so I
wonder if this is really something to bother supporting ongoing.

Col





-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list