diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-10-10 23:20:37 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-10-10 23:20:37 +0200 |
commit | ff7c7697aaee4e71db4840e98ea747a8639471f4 (patch) | |
tree | 7ea57ded98778372384b3d31ccd08191b5fd3042 /lib | |
parent | fd51a5111a1af21053ce3c4935c1eec9e4d5ca9b (diff) | |
download | colin-keep-ff7c7697aaee4e71db4840e98ea747a8639471f4.tar colin-keep-ff7c7697aaee4e71db4840e98ea747a8639471f4.tar.gz colin-keep-ff7c7697aaee4e71db4840e98ea747a8639471f4.tar.bz2 colin-keep-ff7c7697aaee4e71db4840e98ea747a8639471f4.tar.xz colin-keep-ff7c7697aaee4e71db4840e98ea747a8639471f4.zip |
first attempt to hide some system group with 499 < gid < 1000
Diffstat (limited to 'lib')
-rw-r--r-- | 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/; } |