summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/grent.t3
-rwxr-xr-xt/op/pwent.t3
2 files changed, 4 insertions, 2 deletions
diff --git a/t/op/grent.t b/t/op/grent.t
index d4b0e8757d..f2b5b9cabd 100755
--- a/t/op/grent.t
+++ b/t/op/grent.t
@@ -70,7 +70,8 @@ my %seen;
setgrent();
while (<GR>) {
chomp;
- my @s = split /:/;
+ # LIMIT -1 so that groups with no users don't fall off
+ my @s = split /:/, $_, -1;
my ($name_s,$passwd_s,$gid_s,$members_s) = @s;
if (@s) {
push @{ $seen{$name_s} }, $.;
diff --git a/t/op/pwent.t b/t/op/pwent.t
index 0f67eb4287..c09d7c2405 100755
--- a/t/op/pwent.t
+++ b/t/op/pwent.t
@@ -71,7 +71,8 @@ my %seen;
setpwent();
while (<PW>) {
chomp;
- my @s = split /:/;
+ # 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;
next if /^\+/; # ignore NIS includes
if (@s) {