Discussion:
[software/adminpanel] 01/01: first attempt to hide some system group with 499 < gid < 1000
root-odJJhXpcy38dnm+
2014-10-10 21:23:48 UTC
Permalink
This is an automated email from the git hooks/post-receive script.

anaselli pushed a commit to branch master
in repository software/adminpanel.

commit ff7c7697aaee4e71db4840e98ea747a8639471f4
Author: Angelo Naselli <anaselli-***@public.gmane.org>
Date: Fri Oct 10 23:20:37 2014 +0200

first attempt to hide some system group with 499 < gid < 1000
---
Commit Link:
http://gitweb.mageia.org/software/adminpanel/commit/?id=ff7c7697aaee4e71db4840e98ea747a8639471f4

lib/AdminPanel/Module/Users.pm | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/AdminPanel/Module/Users.pm b/lib/AdminPanel/Module/Users.pm
index f7815f4..12925e1 100644
--- a/lib/AdminPanel/Module/Users.pm
+++ b/lib/AdminPanel/Module/Users.pm
@@ -1196,6 +1196,14 @@ sub _refreshGroups {
my @GroupReal;
LOOP: foreach my $g (@$groups) {
next LOOP if $filtergroups && $g->Gid($self->sh_users->USER_GetValue) <= 499 || $g->Gid($self->sh_users->USER_GetValue) == 65534;
+
+ if ($filtergroups && $g->Gid($self->sh_users->USER_GetValue) > 499 && $g->Gid($self->sh_users->USER_GetValue) < 1000) {
+ my $groupname = $g->GroupName($self->sh_users->USER_GetValue);
+ my $l = $self->sh_users->ctx->LookupUserByName($groupname);
+ next if ! defined($l);
+ next LOOP if $l->HomeDir($self->sh_users->USER_GetValue) =~ /^\/($|var\/|run\/)/ || $l->LoginShell($self->sh_users->USER_GetValue) =~ /(nologin|false)$/;
+ }
+
push @GroupReal, $g if $g->GroupName($self->sh_users->USER_GetValue) =~ /^\Q$strfilt/;
}
--
Mageia Git Monkeys.
Loading...