summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-03-18 17:20:40 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-03-18 17:20:40 +0000
commit640008789f1180434a4046e7733e83a5bd8f5ea4 (patch)
tree36b764f48c41e74a080f3d0767f52880f699dee8 /perl-install/standalone
parenta2bc00afd9fb3c84efbc5c7d9a286cb47ba57828 (diff)
downloaddrakx-640008789f1180434a4046e7733e83a5bd8f5ea4.tar
drakx-640008789f1180434a4046e7733e83a5bd8f5ea4.tar.gz
drakx-640008789f1180434a4046e7733e83a5bd8f5ea4.tar.bz2
drakx-640008789f1180434a4046e7733e83a5bd8f5ea4.tar.xz
drakx-640008789f1180434a4046e7733e83a5bd8f5ea4.zip
(get_user_or_group) do not ignore groups with empty password field (#14777)
Diffstat (limited to 'perl-install/standalone')
-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);
}