Bug 797 - getpwent command is broken
getpwent command is broken
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: perl (Show other bugs)
5.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-01-12 12:00 EST by jgarcia
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-03-18 16:58:08 EST
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 jgarcia 1999-01-12 12:00:20 EST
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 15:01:59 EST
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 15:07:59 EST
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 15:13:59 EST
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 17:06:59 EST
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 16:58:59 EST
Fixed in the current beta release

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