From matthias.andree@web.de  Wed Jan  8 05:43:10 2003
Return-Path: <matthias.andree@web.de>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8897B37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 05:43:10 -0800 (PST)
Received: from mail.dt.e-technik.uni-dortmund.de (krusty.dt.e-technik.Uni-Dortmund.DE [129.217.163.1])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7EB7643EB2
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 05:43:09 -0800 (PST)
	(envelope-from matthias.andree@web.de)
Received: from m2a2.dyndns.org (krusty.dt.e-technik.uni-dortmund.de [129.217.163.1])
	by mail.dt.e-technik.uni-dortmund.de (Postfix) with ESMTP id 2AFAFA381A
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 14:43:04 +0100 (CET)
Received: from libertas.emma.line.org (libertas.emma.line.org [192.168.0.2])
	by merlin.emma.line.org (Postfix) with ESMTP id C81DF779BB
	for <FreeBSD-gnats-submit@freebsd.org>; Wed,  8 Jan 2003 14:42:58 +0100 (CET)
Received: from libertas.emma.line.org (localhost [127.0.0.1])
	by libertas.emma.line.org (8.12.6/8.12.6) with ESMTP id h08DI2bJ000561;
	Wed, 8 Jan 2003 14:18:03 +0100 (CET)
	(envelope-from emma@libertas.emma.line.org)
Received: (from emma@localhost)
	by libertas.emma.line.org (8.12.6/8.12.6/Submit) id h08DI1Lc000560;
	Wed, 8 Jan 2003 14:18:01 +0100 (CET)
	(envelope-from emma)
Message-Id: <200301081318.h08DI1Lc000560@libertas.emma.line.org>
Date: Wed, 8 Jan 2003 14:18:01 +0100 (CET)
From: Matthias Andree <matthias.andree@web.de>
Reply-To: Matthias Andree <matthias.andree@web.de>
To: FreeBSD-gnats-submit@freebsd.org
Subject: NIS-based getpwent() falsely returns NULL 
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         46866
>Category:       kern
>Synopsis:       [libc] NIS-based getpwent(3) falsely returns NULL
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 08 05:50:01 PST 2003
>Closed-Date:    
>Last-Modified:  Tue Apr 21 00:06:09 UTC 2009
>Originator:     Matthias Andree
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
>Environment:
System: FreeBSD libertas.emma.line.org 4.7-STABLE FreeBSD 4.7-STABLE #11: Wed Jan 8 01:47:45 CET 2003 toor@libertas.emma.line.org:/usr/src/sys/compile/LIBERTAS i386


	
>Description:
When NIS is enabled e. g. for passwd lookups, and the NIS server goes
down, the NIS domains goes unbound, NIS-based lookups will falsely fail
after 200 seconds (40 retries).

The getpwnam interface (and other similar interfaces) have no means of
returning a temporary error, and applications do not expect temporary
results. As a consequence, the application returns "no such user" when
the user is in fact present, only his/her passwd entry is temporarily
inaccessible.

-su-2.05b# time id -u nbin 
id: nbin: no such user

real    3m20.443s
user    0m0.020s
sys     0m0.026s

This can, for example, cause mail to bounce when the NIS server goes down.

	
>How-To-Repeat:
	
>Fix:
NEVER let NIS-based lookups time out. (Solaris also retries forever.)
	
>Release-Note:
>Audit-Trail:
>Unformatted:
