summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xperl-install/standalone/drakperm10
1 files changed, 7 insertions, 3 deletions
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);
}