aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-28 09:48:09 +0100
committerColin Guthrie <colin@mageia.org>2014-07-28 09:48:09 +0100
commitac74fc46ea1a08e537eefcdd03cfcfbed197ddf9 (patch)
tree264076705b119a275e893b1c4533a26c33b58263
parentdd8f293d9860ef9ae8e0fbe6d30be6e7048a0750 (diff)
downloaduserdrake-ac74fc46ea1a08e537eefcdd03cfcfbed197ddf9.tar
userdrake-ac74fc46ea1a08e537eefcdd03cfcfbed197ddf9.tar.gz
userdrake-ac74fc46ea1a08e537eefcdd03cfcfbed197ddf9.tar.bz2
userdrake-ac74fc46ea1a08e537eefcdd03cfcfbed197ddf9.tar.xz
userdrake-ac74fc46ea1a08e537eefcdd03cfcfbed197ddf9.zip
Improve system user in 500-999 range heuristic by adding /run homedir filtering
-rwxr-xr-xuserdrake2
1 files changed, 1 insertions, 1 deletions
diff --git a/userdrake b/userdrake
index 2cbe8f7..97ad9b8 100755
--- a/userdrake
+++ b/userdrake
@@ -300,7 +300,7 @@ sub RefreshUsersFull {
my @UserReal;
LOOP: foreach my $l (@$users) {
next LOOP if $filterusers && $l->Uid($GetValue) <= 499 || $l->Uid($GetValue) == 65534;
- next LOOP if $filterusers && $l->Uid($GetValue) > 499 && $l->Uid($GetValue) < 1000 && ($l->HomeDir($GetValue) eq "/" || $l->HomeDir($GetValue) =~ /^\/var\// || $l->LoginShell($GetValue) =~ /(nologin|false)$/);
+ next LOOP if $filterusers && $l->Uid($GetValue) > 499 && $l->Uid($GetValue) < 1000 && ($l->HomeDir($GetValue) =~ /^\/($|var\/|run\/)/ || $l->LoginShell($GetValue) =~ /(nologin|false)$/);
push @UserReal, $l if $l->UserName($GetValue) =~ /^\Q$strfilt/;
}
my $i;