From: Gurusamy Sarathy Date: Fri, 2 Oct 1998 02:02:19 +0000 (+0000) Subject: tolerate whitespace in /etc/group entries (suggested by Jarkko X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e5f18aa0018db0d2a1a3299ac5c782f513cdf40;p=p5sagit%2Fp5-mst-13.2.git tolerate whitespace in /etc/group entries (suggested by Jarkko Hietaniemi) p4raw-id: //depot/perl@1906 --- diff --git a/t/op/grent.t b/t/op/grent.t index a04b51b..70b4ce0 100755 --- a/t/op/grent.t +++ b/t/op/grent.t @@ -29,7 +29,7 @@ while () { @s = split /:/; if (@s == 4) { my ($name_s,$passwd_s,$gid_s,$members_s) = @s; - $members_s =~ s/ /,/g; + $members_s =~ s/\s*,\s*/,/g; @n = getgrgid($gid_s); # 'nogroup' et al. next unless @n; @@ -40,7 +40,7 @@ while () { ($name,$passwd,$gid,$members) = @n; next if $name_s ne $name; } - $members =~ s/ /,/g; + $members =~ s/\s+/,/g; $not = 1, last if $name ne $name_s or # Shadow passwords confuse this.