summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-04-03 03:13:08 +0000
committerOlivier Blin <oblin@mandriva.com>2008-04-03 03:13:08 +0000
commit03bc23366cce9fcf2fd9d0b525f34bd84331fc14 (patch)
tree751673cc27869f5e95f70e0b8c3cf44372cd5b40
parent2ebca25d733d0f8566ae3cde6f9239b91efb95ca (diff)
downloadperl-MDK-Common-03bc23366cce9fcf2fd9d0b525f34bd84331fc14.tar
perl-MDK-Common-03bc23366cce9fcf2fd9d0b525f34bd84331fc14.tar.gz
perl-MDK-Common-03bc23366cce9fcf2fd9d0b525f34bd84331fc14.tar.bz2
perl-MDK-Common-03bc23366cce9fcf2fd9d0b525f34bd84331fc14.tar.xz
perl-MDK-Common-03bc23366cce9fcf2fd9d0b525f34bd84331fc14.zip
workaround glibc misconfiguration that make users listed twice (#34279)
-rw-r--r--lib/MDK/Common/System.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm
index b856e70..08ea8df 100644
--- a/lib/MDK/Common/System.pm
+++ b/lib/MDK/Common/System.pm
@@ -279,7 +279,7 @@ sub list_passwd() {
@l;
}
sub list_home() {
- map { $_->[7] } grep { $_->[2] >= 500 } list_passwd();
+ uniq(map { $_->[7] } grep { $_->[2] >= 500 } list_passwd());
}
sub list_skels {
my ($prefix, $suffix) = @_;
@@ -287,7 +287,7 @@ sub list_skels {
}
sub list_users() {
- map { 500 <= $_->[2] && $_->[0] ne "nobody" ? $_->[0] : () } list_passwd();
+ uniq(map { 500 <= $_->[2] && $_->[0] ne "nobody" ? $_->[0] : () } list_passwd());
}