Bug 1001 - getpwent()/yp broken on sparc?
getpwent()/yp broken on sparc?
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
5.2
sparc Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-01-31 09:12 EST by torstei
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-05-31 16:46:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description torstei 1999-01-31 09:12:32 EST
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();
        putpwent(pwd,stdout);
    }
    endpwent();
}
Comment 1 David Lawrence 1999-05-31 16:46:59 EDT
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.