From 7804bb4718ae82412e462a3f50187d7d4bf2778f Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 4 Apr 2016 23:29:47 +0200 Subject: perl_checker cleanups --- lib/MDK/Common/System.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib') diff --git a/lib/MDK/Common/System.pm b/lib/MDK/Common/System.pm index e98b3c5..fbeccd5 100644 --- a/lib/MDK/Common/System.pm +++ b/lib/MDK/Common/System.pm @@ -308,15 +308,15 @@ sub is_real_user { # and have a homedir that is not / or does not start with /var or /run # and have a shell that does not end in "nologin" or "false" - my (undef,undef,$uid,undef,undef,undef,undef,$homedir,$shell) = getpwnam($username); - ($uid >= 1000 || ($uid >= 500 && $homedir !~ /^\/($|var\/|run\/)/ && $shell !~ /(nologin|false)$/)); + my (undef, undef, $uid, undef, undef, undef, undef, $homedir, $shell) = getpwnam($username); + ($uid >= 1000 || ($uid >= 500 && $homedir !~ m!^/($|var/|run/)! && $shell !~ /(nologin|false)$/)); } sub is_real_group { my ($groupname) = @_; return 0 if $groupname eq "nogroup"; - my (undef,undef,$gid,$members) = getgrnam($groupname); + my (undef, undef, $gid, $members) = getgrnam($groupname); return 0 if $gid < 500; return 1 if $gid >= 1000; @@ -324,7 +324,7 @@ sub is_real_group { # We consider ourselves a "real" group if this is the primary group of a user # with the same name, or we have any member users who are "real" - my (undef,undef,undef,$ugid) = getpwnam($groupname); + my (undef, undef, undef, $ugid) = getpwnam($groupname); return 1 if $ugid == $gid && is_real_user($groupname); # OK we're not a primary group, but perhaps we have some real members? -- cgit v1.2.1