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 797 - getpwent command is broken
Summary: getpwent command is broken
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: perl
Version: 5.2
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-12 17:00 UTC by jgarcia
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-03-18 21:58:08 UTC


Attachments (Terms of Use)

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


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