]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysusers: do not warn about values that equivalent
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 Aug 2022 13:38:56 +0000 (15:38 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 24 Aug 2022 08:02:46 +0000 (10:02 +0200)
commit5f465fda4ec9f1e70a1bb993944ea92b2469b0db
treef89c98c7c4034e1cd0e570f3b3c57d2366ca6369
parent0336c23e98caf9a8e374ef3823858a9926077ec8
sysusers: do not warn about values that equivalent

We'd warn that "-" and "/sbin/nologin" are different, even even though
"/sbin/nologin" is the default we'd use. So let's stop warning in all cases
where the config would lead to the same file, also under different paths,
or when both shells are nologin shells.

The general idea is to avoid warnings when sysusers config is moved between
packages (and not exactly the same), or when it is generated from some template
and the details change in an unimportant way.

We try to chase symlinks. This means that on unmerged-usr systems we'll find
that e.g. /usr/bin/bash and /bin/bash are equivalent if the basic fs structure
is already in place (bash doesn't actually have to be installed, enough that
the /bin symlink exists). I think this is a good result: after all, /bin/bash
and /usr/bin/bash *may* be different things on an unmerged-usr system.

Fixes #24215.
src/sysusers/sysusers.c