diff options
author | Paul Schinder <schinder@pobox.com> | 2001-04-05 09:21:42 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-05 18:20:32 +0000 |
commit | 32b4ad3c69185f4ce7cd382edebd968b87bc3e6f (patch) | |
tree | 8d9ae71eb83b3e07ead79c06a2fc813559f1b888 | |
parent | 0d0e97a6540e8e9ecf764a9f6f037bc502fa5012 (diff) | |
download | perl-32b4ad3c69185f4ce7cd382edebd968b87bc3e6f.tar.gz |
Re: Not OK: perl v5.6.1 +fools-gold on darwin 1.3 (UNINSTALLED)
Message-Id: <p05100900b6f25159e767@[10.0.1.52]>
Mac OS X (Darwin) has extra pwent fields.
p4raw-id: //depot/perl@9563
-rwxr-xr-x | t/op/pwent.t | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/t/op/pwent.t b/t/op/pwent.t index 4cccbfe016..d811f06a33 100755 --- a/t/op/pwent.t +++ b/t/op/pwent.t @@ -73,7 +73,12 @@ while (<PW>) { chomp; # LIMIT -1 so that users with empty shells don't fall off my @s = split /:/, $_, -1; - my ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s; + my ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s); + if ($^O eq 'darwin') { + ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s[0,1,2,3,7,8,9]; + } else { + ($name_s, $passwd_s, $uid_s, $gid_s, $gcos_s, $home_s, $shell_s) = @s; + } next if /^\+/; # ignore NIS includes if (@s) { push @{ $seen{$name_s} }, $.; @@ -88,7 +93,7 @@ while (<PW>) { } # In principle we could whine if @s != 7 but do we know enough # of passwd file formats everywhere? - if (@s == 7) { + if (@s == 7 || ($^O eq 'darwin' && @s == 10)) { @n = getpwuid($uid_s); # 'nobody' et al. next unless @n; |