Make the gruop parser handle blank lines in /etc/group
Chris Nehren [Tue, 7 Aug 2012 19:24:27 +0000 (19:24 +0000)]
lib/System/Introspector/Probe/Groups.pm

index aa205ae..abdbb7c 100644 (file)
@@ -13,6 +13,7 @@ sub gather {
         my $fh = $self->_open_group_file;
         while (defined( my $line = <$fh> )) {
             chomp $line;
+            next if !(length $line);
             my ($name, undef, $gid, $users) = split m{:}, $line;
             $users = length($users)
                 ? [split m{,}, $users]