Bug 797

Summary: getpwent command is broken
Product: [Retired] Red Hat Linux Reporter: jgarcia
Component: perlAssignee: Crutcher Dunnavant <crutcher>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-03-18 21:58:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jgarcia 1999-01-12 17:00:20 UTC
The getpwent command reports back proper information except
for the gcos field which is always blank.  The getpwent
command works just fine under C.

Comment 1 David Lawrence 1999-01-12 20:01:59 UTC
Could you please send a small sample piece of code where this is
failing so we can see how it is being used.

Comment 2 jgarcia 1999-01-12 20:07:59 UTC
while (($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir,
$shell) = getpwent)
{
        print "$name, $passwd, $uid, $gid, $quota, $comment, $gcos,
$dir, $shell";
};

Comment 3 jgarcia 1999-01-12 20:13:59 UTC
while (($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir,
$shell) = getpwent)
{
        print "$name, $passwd, $uid, $gid, $quota, $comment, $gcos,
$dir, $shell";
};

The script we are using getpwent with doesn't actually print out the
info, but I just tried this and it is broken as well.  The script we
are using had been running just fine for a couple of months on both
5.0 and 5.1 before upgrading to 5.2.  Hope this helps!

Comment 4 David Lawrence 1999-01-12 22:06:59 UTC
I have been able to verify this on a 5.2 machine in the test lab.
The script supplied below produces the following output.
root, ERidbVVyHkHw2, 0, 0, , , , /root, /bin/bash
bin, *, 1, 1, , , , /bin,
daemon, *, 2, 2, , , , /sbin,
adm, *, 3, 4, , , , /var/adm,
lp, *, 4, 7, , , , /var/spool/lpd,
sync, *, 5, 0, , , , /sbin, /bin/sync
shutdown, *, 6, 0, , , , /sbin, /sbin/shutdown
halt, *, 7, 0, , , , /sbin, /sbin/halt
mail, *, 8, 12, , , , /var/spool/mail,
news, *, 9, 13, , , , /var/spool/news,
uucp, *, 10, 14, , , , /var/spool/uucp,
operator, *, 11, 0, , , , /root,
games, *, 12, 100, , , , /usr/games,
gopher, *, 13, 30, , , , /usr/lib/gopher-data,
ftp, *, 14, 50, , , , /home/ftp,
nobody, *, 99, 99, , , , /,
postgres, !!, 100, 233, , , , /var/lib/pgsql, /bin/bash

This has been assigned to a developer for further review.

Comment 5 Cristian Gafton 1999-03-18 21:58:59 UTC
Fixed in the current beta release