summaryrefslogtreecommitdiffstats
path: root/lib/MDK/Common/System.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDK/Common/System.pm')
-rw-r--r--lib/MDK/Common/System.pm8
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?