Subject: lib/3279: getpwent(3) misleading
To: None <gnats-bugs@gnats.netbsd.org>
From: None <david@mono.org>
List: netbsd-bugs
Date: 03/03/1997 11:59:54
>Number: 3279
>Category: lib
>Synopsis: getpwent(3) misleading
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Mon Mar 3 04:20:02 1997
>Last-Modified:
>Originator: David Brownlee
>Organization:
<a href="http://www.mono.org/>Monochrome</a>
>Release: dec 10
>Environment:
System: NetBSD orwell.southern.net 1.2B NetBSD 1.2B (GENERIC) #11: Tue Dec 10 00:24:14 MET 1996 pk@flambard:/usr/src/sys/arch/sparc/compile/GENERIC sparc
>Description:
getpwent(3) states:
BUGS
The functions getpwent(), getpwnam(), and getpwuid(), leave their results
in an internal static object and return a pointer to that object. Subse-
quent calls to the same function will modify the same object.
Code inspection reveals they all use the _same_ static object.
>How-To-Repeat:
Read man page. Take literally.
>Fix:
The above chould possibly be better phrased as:
The functions getpwent(), getpwnam(), and getpwuid(), leave their results
in an internal static object and return a pointer to that object. Subse-
quent calls to the any of these functions will modify the same object.
>Audit-Trail:
>Unformatted: