[PATCH] fill_user_info: fake user info for 'root' if it can not be found

Lennart Poettering mzqohf at 0pointer.de
Tue Feb 26 12:17:11 PST 2013

On Mon, 25.02.13 18:03, Simon McVittie (simon.mcvittie at collabora.co.uk) wrote:

> On 25/02/13 15:14, Tom Gundersen wrote:
> > This should make make libdbus a bit more robust against bugs or configuration
> > errors. In particular, it should make it work on an empty /etc or in case nss is
> > broken, misconfigured or simply missing.
> This doesn't seem like something that ought to be wired into every
> sufficiently-low-level library and utility: if it needs to be
> configurable, then it needs to be configurable, and if it doesn't,
> shouldn't libc do this for you?

As a side note: we currently have a similar special casing for NSS for
the root user in systemd, because we want to avoid NSS calls as much as
possible if we can avoid them, since they might block and involve
network communication. And as most system daemons, especially in early
boot run as root, this more or less us to reduce the number of NSS calls
of the "systemd" binary itself to a value next to zero.

> Alternatively, have you considered using a NSS module that "knows who
> root is", analogous to nss-myhostname?

Hmm, i'd claim that most software wouldn't gain anything from special
casing NSS for the root user. This is only beneficial to the very
special early boot stuff we have like systemd and dbus.


Lennart Poettering - Red Hat, Inc.

More information about the dbus mailing list