diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-04-04 23:29:47 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-04-04 23:31:16 +0200 |
commit | 7804bb4718ae82412e462a3f50187d7d4bf2778f (patch) | |
tree | db94c307f0639f683ff4ecdb5628c66368cc3679 /lib | |
parent | 3e68a70123b1ed411234f2175bf673979bf77e6c (diff) | |
download | perl-MDK-Common-7804bb4718ae82412e462a3f50187d7d4bf2778f.tar perl-MDK-Common-7804bb4718ae82412e462a3f50187d7d4bf2778f.tar.gz perl-MDK-Common-7804bb4718ae82412e462a3f50187d7d4bf2778f.tar.bz2 perl-MDK-Common-7804bb4718ae82412e462a3f50187d7d4bf2778f.tar.xz perl-MDK-Common-7804bb4718ae82412e462a3f50187d7d4bf2778f.zip |
perl_checker cleanups
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MDK/Common/System.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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? |