[PATCH] fill_user_info: fake user info for 'root' if it can not be found
mzqohf at 0pointer.de
Tue Feb 26 16:42:15 PST 2013
On Tue, 26.02.13 13:13, Thiago Macieira (thiago at kde.org) wrote:
> On terça-feira, 26 de fevereiro de 2013 21.17.11, Lennart Poettering wrote:
> > 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.
> That's an argument I can accept. Instead of trying to work around a broken
> system that is almost never going to be seen in the wild, improving boot-timer
> performance by avoiding the NSS dependency is very welcome.
Well, it's not so much about that, for systemd it's primarily about the
cyclic dep issue: if NSS is backed by a local service (and many are),
and systemd is the one starting and babysitting that service, then
systemd shouldn't also be a client to that service. We have this weird
dependency between dbus and systemd already, where systemd starts dbus
but is also client to dbus. Having two processes that are both clients
and servers to each easily results in dead-locks. For the relationship
between systemd and dbus we mostly can contain this, but for the more
generic relationship between the various NSS services and systemd this
would be much harder...
Lennart Poettering - Red Hat, Inc.
More information about the dbus