Comment 26 for bug 27520

Revision history for this message
Matthias Andree (matthias-andree) wrote : Re: [Bug 27520] Re: cron daemon caches user-non-existent lookup results, causing "ORPHAN" message and skipping jobs for all LDAP/NIS-defined users

Am 08.06.2011 01:17, schrieb Christian Kastner:

> Theoretically, this could easily be extended to #27520 -- just a few
> lines of code, actually -- but it's just not that simple, because there
> are cases where ORPHAN is completely valid, ie the user really doesn't
> exist.

Fine, but cron should recheck.

> All cron does is call getpwnam(), so it cannot differentiate between the
> two cases. Were we to simply re-check the ORPHANS every time, we'd creat
> a bug-like situation for that other use case.

Yes, and the underlying database can legitimately change over time, so
cron should recheck.

Now, this particular bug reveals yet another time that the GNU libc
implementation of Name Service Switch is insufficient and has design
flaws. On the affected systems I've checked, nsswitch has "passwd:
files nis". The tryagain/unavail default reactions are "continue", but
the getpw*() functions cannot return temporary failure, so cron cannot
distinguish a "don't know yet, ask again later" from a "user does not
exist" condition.

I'd filed an upstream bug against glibc 7 years ago to port Solaris's
"tryagain=forever" reaction - which is the default for most sources BTW.
http://sources.redhat.com/bugzilla/show_bug.cgi?id=430

--
Matthias Andree