From 640008789f1180434a4046e7733e83a5bd8f5ea4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 18 Mar 2005 17:20:40 +0000 Subject: (get_user_or_group) do not ignore groups with empty password field (#14777) --- perl-install/standalone/drakperm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'perl-install/standalone/drakperm') diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm index d4c2a8ea6..2f6cb8269 100755 --- a/perl-install/standalone/drakperm +++ b/perl-install/standalone/drakperm @@ -410,9 +410,13 @@ sub get_user_or_group { my @users; local $_; - foreach (cat_($what eq 'users' ? '/etc/passwd' : '/etc/group')) { - m/^([^#:]+):[^:]+:[^:]+:/ or next; - push @users, $1; + my $is_users = $what eq 'users'; + foreach (cat_($is_users ? '/etc/passwd' : '/etc/group')) { + if ($is_users) { + push @users, $1 if m/^([^#:]+):[^:]+:[^:]+:/; # or next; + } else { + push @users, $1 if m/^([^#:]+):[^:]*:[^:]*:/; # or next; + } } return sort(@users); } -- cgit v1.2.1