NetBSD Problem Report #29272

From tonio@arcelot.loria.fr  Mon Feb  7 17:15:34 2005
Return-Path: <tonio@arcelot.loria.fr>
Received: from arcelot.loria.fr (arcelot.loria.fr [152.81.9.88])
	by narn.netbsd.org (Postfix) with ESMTP id ACC5F63B400
	for <gnats-bugs@gnats.NetBSD.org>; Mon,  7 Feb 2005 17:15:33 +0000 (UTC)
Message-Id: <200502071713.j17HDxgo023449@arcelot.loria.fr>
Date: Mon, 7 Feb 2005 18:13:59 +0100 (CET)
From: reilles@loria.fr
Reply-To: reilles@loria.fr
To: gnats-bugs@netbsd.org
Subject: strange nis behavior
X-Send-Pr-Version: 3.95

>Number:         29272
>Category:       lib
>Synopsis:       strange nis behavior
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lukem
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 07 17:16:00 +0000 2005
>Closed-Date:    Mon Feb 28 00:40:33 +0000 2005
>Last-Modified:  Mon Feb 28 00:41:00 +0000 2005
>Originator:     Antoine Reilles
>Release:        NetBSD 2.99.15
>Organization:
>Environment:


System: NetBSD arcelot.loria.fr 2.99.15 NetBSD 2.99.15 (MYKERNEL) #0: Fri Feb 4 15:23:32 CET 2005 tonio@arcelot.loria.fr:/usr/obj/sys/arch/i386/compile/MYKERNEL i386
Architecture: i386
Machine: i386
>Description:
I am trying to setup nis to let people log into my machine.
$ ypcat passwd | wc -l
987

However, only a few nis accounts can login (belonging to different
groups), the others getting "unknown login".
$ getent passwd | wc -l
69

The account which causes the fail is:
nobody:*:4294967294:4294967294::/rien:/pasdeshell
Those numbers exceed UID_MAX (2147483647) and GID_MAX (2147483647).

In 2.0, the failing account was ignored, but in -current, it makes all the
following accounts in the ypcat list fails.

Thanks to Luke Mewburn, who tracked the problem, this seems caused by a change
in the behavior of getpwent.c (and getgrent.c) code. 
This change is really problematic, as it is traditional to use such accounts
for nobody:
http://mail-index.netbsd.org/current-users/1999/01/07/0010.html

>How-To-Repeat:
Use a nis with a sun os server.
try to log in with an annound listed after nobody in ypcat. Show it fails.
constate that ypcat passwd | wc -l lists much more accounts than getent passwd | wc -l
>Fix:
revert this change so that getpwent and getgrent work like in 2.0

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: gnats-admin->lukem
Responsible-Changed-By: lukem@netbsd.org
Responsible-Changed-When: Mon, 28 Feb 2005 00:40:33 +0000
Responsible-Changed-Why:
I fixed it


State-Changed-From-To: open->closed
State-Changed-By: lukem@netbsd.org
State-Changed-When: Mon, 28 Feb 2005 00:40:33 +0000
State-Changed-Why:
This is fixed in rev 1.66 of getpwent.c


From: Luke Mewburn <lukem@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/29272 CVS commit: src/lib/libc/gen
Date: Mon, 28 Feb 2005 00:40:06 +0000 (UTC)

 Module Name:	src
 Committed By:	lukem
 Date:		Mon Feb 28 00:40:05 UTC 2005

 Modified Files:
 	src/lib/libc/gen: getpwent.c

 Log Message:
 Restore getpwent() behaviour prior to rev 1.57; skip dodgy NIS & DNS entries
 rather than failing with NS_UNAVAIL when encountering them.
 Fixes PR 29272 by Antoine Reilles.


 To generate a diff of this commit:
 cvs rdiff -r1.65 -r1.66 src/lib/libc/gen/getpwent.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.