public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
@ 2004-10-07 15:00 matthias dot andree at gmx dot de
  2005-09-26 14:58 ` [Bug libc/430] " drepper at redhat dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2004-10-07 15:00 UTC (permalink / raw)
  To: glibc-bugs

The nsswitch.conf mechanism doesn't support a TRYAGAIN=forever switch which is
necessary to properly support NIS and similar services with the limited getpw*()
interface.

Problem: an application calling getpwnam() has no means to detect that it got
NULL because NIS was failed (NIS server dropped dead, whatever), which is a
temporary failure, rather than because the user was nonexistent.

Consequences: applications can wreak havoc if they are told "no such user" when
in fact the user exists but the information was temporarily unavailable. The
result may be that mail bounces, with the computer claiming the addressee were
non-existent, users being unsubscribed from mailing lists, users being unable to
log in and similar.

Suggested fix: Add an option TRYAGAIN=forever for nsswitch.conf that lets it
spin on the service that returned TRYAGAIN until it returns some different
condition, and make it the default for services such as nis that can exhibit
this problem. This will avoid returning temporary results.

Cross-Reference:
http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/46866

-- 
           Summary: nsswitch.conf doesn't support TRYAGAIN=forever, giving
                    bogus results when NIS is not responding
           Product: glibc
           Version: 2.3.3
            Status: NEW
          Severity: critical
          Priority: P2
         Component: libc
        AssignedTo: gotom at debian dot or dot jp
        ReportedBy: matthias dot andree at gmx dot de
                CC: glibc-bugs at sources dot redhat dot com
  GCC host triplet: i686-suse-linux


http://sources.redhat.com/bugzilla/show_bug.cgi?id=430

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
@ 2005-09-26 14:58 ` drepper at redhat dot com
  2006-01-12 16:59 ` matthias dot andree at gmx dot de
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: drepper at redhat dot com @ 2005-09-26 14:58 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2005-09-26 14:56 -------
NSS is just a mechanism to tie the various lookup mechanisms together.  The
single lookup functions always could return for temporary failures.  It's not
NSS's job to correct those.  The caller has always the possibility to restart
tthe operation since in these cases errno is set to EAGAIN.  This gives also
much better granularity of the waiting.  Some programs cannot wait really
forever but are able to wait a substantial amount of time.  Adding all this
flexibility to NSS is not advisable.

So, fix the application which has the problem.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
  2005-09-26 14:58 ` [Bug libc/430] " drepper at redhat dot com
@ 2006-01-12 16:59 ` matthias dot andree at gmx dot de
  2006-01-12 17:03 ` matthias dot andree at gmx dot de
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-01-12 16:59 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2006-01-12 16:59 -------
Closing the bug is bogus. If you're copying a Solaris interface for lack of a
better concept, you might at least get it right^Wcompatible witht he original
implementation.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
  2005-09-26 14:58 ` [Bug libc/430] " drepper at redhat dot com
  2006-01-12 16:59 ` matthias dot andree at gmx dot de
@ 2006-01-12 17:03 ` matthias dot andree at gmx dot de
  2006-04-19  8:45 ` matthias dot andree at gmx dot de
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-01-12 17:03 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2006-01-12 17:03 -------
Further reasons why the current implementation are wrong are in the original
report. What is the application to make of EIO? With traditional non-NSS
systems, it was permanent, with the bogus glibc NSS implementation, it might as
well be transient and cause the security relevant false results.

Beyond that, getpwnam() might return NULL with errno == ENOMEM, which is bogus
as per IEEE Std 1003.1-2001, 2004 edition.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (2 preceding siblings ...)
  2006-01-12 17:03 ` matthias dot andree at gmx dot de
@ 2006-04-19  8:45 ` matthias dot andree at gmx dot de
  2006-04-22 17:57 ` drepper at redhat dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-04-19  8:45 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2006-04-19 08:44 -------
Oh, and to make matters worse, temporary errors (NIS domain not bound) lead to 
getpwnam() returning NULL with errno left at (or set to) 0, so there isn't even 
the documented EIO hint and the error condition "NIS compat mode lookup failed 
temporarily" is completely indistinguishable from "NIS compat lookup succeeded 
and ended up with a definitive no such user".

(Observed with glibc-2.3.5 on SUSE Linux 10.0 i586 - bumping glibc version and 
priority.)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
            Version|2.3.3                       |2.3.5


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (3 preceding siblings ...)
  2006-04-19  8:45 ` matthias dot andree at gmx dot de
@ 2006-04-22 17:57 ` drepper at redhat dot com
  2006-04-23 14:49 ` matthias dot andree at gmx dot de
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: drepper at redhat dot com @ 2006-04-22 17:57 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-04-22 17:57 -------
If there are cases where errors are not reported correctly that has to be
reported separately and with concrete examples so that it can be traced.  The
rest is just meaningless rumbling.  Do not reopen the bug, fix your code.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (4 preceding siblings ...)
  2006-04-22 17:57 ` drepper at redhat dot com
@ 2006-04-23 14:49 ` matthias dot andree at gmx dot de
  2006-04-25 17:58 ` drepper at redhat dot com
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-04-23 14:49 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2006-04-23 14:49 -------
Further related bugs can be filed in separate bugs, of course, but that doesn't 
invalidate the problem that glibc's nsswitch lacks a crucial feature. (Note that 
not all operating systems set errno on getpwnam() failures so that code ported 
over may not check getpwnam() even though my own code does.)

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (5 preceding siblings ...)
  2006-04-23 14:49 ` matthias dot andree at gmx dot de
@ 2006-04-25 17:58 ` drepper at redhat dot com
  2006-12-07 14:11 ` matthias dot andree at gmx dot de
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: drepper at redhat dot com @ 2006-04-25 17:58 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2006-04-25 17:58 -------
Nothing is lacking.  Stop reopening the bug.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (6 preceding siblings ...)
  2006-04-25 17:58 ` drepper at redhat dot com
@ 2006-12-07 14:11 ` matthias dot andree at gmx dot de
  2007-02-18  4:02 ` drepper at redhat dot com
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2006-12-07 14:11 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2006-12-07 14:10 -------
Bug still unfixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (7 preceding siblings ...)
  2006-12-07 14:11 ` matthias dot andree at gmx dot de
@ 2007-02-18  4:02 ` drepper at redhat dot com
  2007-02-18 12:41 ` matthias dot andree at gmx dot de
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: drepper at redhat dot com @ 2007-02-18  4:02 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2007-02-18 04:02 -------
If you reopen this non-bug again I have to get your account removed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |WORKSFORME


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (8 preceding siblings ...)
  2007-02-18  4:02 ` drepper at redhat dot com
@ 2007-02-18 12:41 ` matthias dot andree at gmx dot de
  2007-02-18 12:45 ` matthias dot andree at gmx dot de
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2007-02-18 12:41 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2007-02-18 12:41 -------
Created an attachment (id=1563)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1563&action=view)
demonstrator for bug

This program can be used to show the libc bugs.
Configure "passwd: compat" in nsswitch.conf, configure your NIS domain, be sure
to run the ypbind daemon, then killall nscd ypserv and see:

$ domainname
example
$ killall ypserv nscd
$ ./try nonexist
YPBINDPROC_DOMAIN: Domain not bound
YPBINDPROC_DOMAIN: Domain not bound
got (nil), errno = 0 (Success)

So we can nicely see who *really* has to fix their software - certainly not the
reporter...

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (9 preceding siblings ...)
  2007-02-18 12:41 ` matthias dot andree at gmx dot de
@ 2007-02-18 12:45 ` matthias dot andree at gmx dot de
  2007-02-19  1:29 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2007-02-18 12:45 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2007-02-18 12:45 -------
Drepper, try to stick to technical arguments rather than trying to bully people
who bring bad news. These messengers might eventually shout these inferior (to
put it mildly) bug handling policies, people involved and consequences even for
bug-free software from the rooftops. After all, you're not the assignee... and
I'm not at all impressed.

One of the issues mentioned here persists even with this newer glibc version, so
I'm setting "Version unspecified" since 2.5 isn't yet there in the bugzilla:

GNU C Library stable release version 2.5 (20061011), by Roland McGrath et al.
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Configured for i686-suse-linux.
Compiled by GNU CC version 4.1.2 20061115 (prerelease) (SUSE Linux).
Compiled on a Linux 2.6.18 system on 2006-11-26.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        GNU libio by Per Bothner
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
        NoVersion patch for broken glibc 2.0 binaries
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |
            Version|2.3.5                       |unspecified


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (10 preceding siblings ...)
  2007-02-18 12:45 ` matthias dot andree at gmx dot de
@ 2007-02-19  1:29 ` fche at redhat dot com
  2007-02-19  1:42 ` matthias dot andree at gmx dot de
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 18+ messages in thread
From: fche at redhat dot com @ 2007-02-19  1:29 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From fche at redhat dot com  2007-02-19 01:29 -------
(In reply to comment #10)
> Created an attachment (id=1563)
 --> (http://sourceware.org/bugzilla/attachment.cgi?id=1563&action=view) demonstrator for bug
> This program can be used to show the libc bugs.

Perhaps it the title of this report should be changed to refer to the suspected
bug (getpwname returning NULL with errno 0 for some errors), instead of the
suggested solution (supporting infinite retry).


-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (11 preceding siblings ...)
  2007-02-19  1:29 ` fche at redhat dot com
@ 2007-02-19  1:42 ` matthias dot andree at gmx dot de
  2010-06-01  3:11 ` pasky at suse dot cz
  2010-06-01  8:20 ` matthias dot andree at gmx dot de
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2007-02-19  1:42 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2007-02-19 01:42 -------
Perhaps not, because fixing errno handling is only to defang one of Drepper's
bogus arguments. getpwnam() and thereabouts do not offer standard errno values
to allow for distinguishing permanent from intermittent errors in IEEE
1003.1-2001, 2004 edition and hence software needs to be fully functional even
if it's not designed to handle ESRCH or EAGAIN.

-- 


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (12 preceding siblings ...)
  2007-02-19  1:42 ` matthias dot andree at gmx dot de
@ 2010-06-01  3:11 ` pasky at suse dot cz
  2010-06-01  8:20 ` matthias dot andree at gmx dot de
  14 siblings, 0 replies; 18+ messages in thread
From: pasky at suse dot cz @ 2010-06-01  3:11 UTC (permalink / raw)
  To: glibc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal
           Priority|P1                          |P2


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
  2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
                   ` (13 preceding siblings ...)
  2010-06-01  3:11 ` pasky at suse dot cz
@ 2010-06-01  8:20 ` matthias dot andree at gmx dot de
  14 siblings, 0 replies; 18+ messages in thread
From: matthias dot andree at gmx dot de @ 2010-06-01  8:20 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From matthias dot andree at gmx dot de  2010-06-01 08:20 -------
This is a critical bug in environments where information obtained this way is
used for access control. Please do not demote the Severity.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
       [not found] <bug-430-131@http.sourceware.org/bugzilla/>
  2011-06-08  9:11 ` matthias.andree at gmx dot de
@ 2011-06-08  9:12 ` matthias.andree at gmx dot de
  1 sibling, 0 replies; 18+ messages in thread
From: matthias.andree at gmx dot de @ 2011-06-08  9:12 UTC (permalink / raw)
  To: glibc-bugs

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

Matthias Andree <matthias.andree at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED

-- 
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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

* [Bug libc/430] nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding
       [not found] <bug-430-131@http.sourceware.org/bugzilla/>
@ 2011-06-08  9:11 ` matthias.andree at gmx dot de
  2011-06-08  9:12 ` matthias.andree at gmx dot de
  1 sibling, 0 replies; 18+ messages in thread
From: matthias.andree at gmx dot de @ 2011-06-08  9:11 UTC (permalink / raw)
  To: glibc-bugs

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.


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2011-06-08  9:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-07 15:00 [Bug libc/430] New: nsswitch.conf doesn't support TRYAGAIN=forever, giving bogus results when NIS is not responding matthias dot andree at gmx dot de
2005-09-26 14:58 ` [Bug libc/430] " drepper at redhat dot com
2006-01-12 16:59 ` matthias dot andree at gmx dot de
2006-01-12 17:03 ` matthias dot andree at gmx dot de
2006-04-19  8:45 ` matthias dot andree at gmx dot de
2006-04-22 17:57 ` drepper at redhat dot com
2006-04-23 14:49 ` matthias dot andree at gmx dot de
2006-04-25 17:58 ` drepper at redhat dot com
2006-12-07 14:11 ` matthias dot andree at gmx dot de
2007-02-18  4:02 ` drepper at redhat dot com
2007-02-18 12:41 ` matthias dot andree at gmx dot de
2007-02-18 12:45 ` matthias dot andree at gmx dot de
2007-02-19  1:29 ` fche at redhat dot com
2007-02-19  1:42 ` matthias dot andree at gmx dot de
2010-06-01  3:11 ` pasky at suse dot cz
2010-06-01  8:20 ` matthias dot andree at gmx dot de
     [not found] <bug-430-131@http.sourceware.org/bugzilla/>
2011-06-08  9:11 ` matthias.andree at gmx dot de
2011-06-08  9:12 ` matthias.andree at gmx dot de

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).