Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1001 - getpwent()/yp broken on sparc?
Summary: getpwent()/yp broken on sparc?
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 5.2
Hardware: sparc
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-01-31 14:12 UTC by torstei
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-05-31 20:46:29 UTC

Attachments (Terms of Use)

Description torstei 1999-01-31 14:12:32 UTC
getpwent() seems to be broken in RedHat 5.2 /sparc,
it will correctly return passwd-entries from both
the /etc/passwd file and the yp database, but it will
return an extra line containing the "+" line from
/etc/passwd, and this crashes finger (and possibly
other programs as well).

The bug is demonstrated by the following program
on my system (SS/2 running 5.2 using yp), look for a line
with "+::0:0:::" in the output.

#include <pwd.h>
#include <sys/types.h>
#include <stdio.h>

int main(int argc, char *argv[])
    struct passwd * pwd;

    pwd = getpwent();
    while(pwd != NULL) {
        pwd = getpwent();

Comment 1 David Lawrence 1999-05-31 20:46:59 UTC
This problem does not occur in Red Hat 6.0.

Note You need to log in before you can comment on or make changes to this bug.