Merge pull request #107 from ovh/itsover9000

fix: groupList: remove 9K group limit
This commit is contained in:
Stéphane Lesimple 2020-12-29 13:32:57 +01:00 committed by GitHub
commit ebc3c2c6df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -655,11 +655,9 @@ sub get_group_list {
return $_cache_get_group_list{$groupType};
}
my $antiloop = 9000;
my %groups;
setgrent();
while (my @nextgroup = getgrent()) {
$antiloop-- < 0 and last;
my ($name, $passwd, $gid, $members) = @nextgroup;
if ( $groupType eq 'key'
and $name =~ /^key/