This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding


http://sourceware.org/bugzilla/show_bug.cgi?id=430

--- Comment #15 from Matthias Andree <matthias.andree at gmx dot de> 2011-06-08 09:11:23 UTC ---
Regarding errno (or result code of getpwnam_r()) checking, this still doesn't
happen in glibc 2.11 (in violation of IEEE Std 1003.1 as of before this bug
report) and is not portable. FreeBSD 8-STABLE  leaves errno at 0 in
temporary-failure-on-nis conditions (but retries for an extended but bounded
amount of time). 

The Linux man-pages project effectively documents that there is no portable way
to distinguish temporary errors from an authoritative "user does not exist" -
which is likely why applications don't even bother.

Several documentation inconsistencies even in glibc exist, for instance, the
info file does not document errno use in getpwnam() at all, the external Linux
man-pages project documents errno, but is probably not authoritative for glibc.

An intesting practical consequence denying cron service is documented in
https://bugs.launchpad.net/bugs/27520 - cron starts before ypbind and caches
the getpwnam("someuser") == NULL result... this would not happen with
TRYAGAIN=forever.

Which leaves us with the solution I've requested in 2004, retry forever, for
lack of better solutions. Perhaps POSIXLY_CORRECT could make a difference to
this behaviour or the defaults, but the current sitation is the same as 7 years
ago, other newer operating system versions are also still non-conformant, so
that applications will continue to ignore errno when using getpwnam().

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]