The getpwent command reports back proper information except for the gcos field which is always blank. The getpwent command works just fine under C.
Could you please send a small sample piece of code where this is failing so we can see how it is being used.
while (($name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell) = getpwent) { print "$name, $passwd, $uid, $gid, $quota, $comment, $gcos, $dir, $shell"; };
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!
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.
Fixed in the current beta release