aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-07-27 21:35:31 +0100
committerColin Guthrie <colin@mageia.org>2014-07-27 21:35:31 +0100
commitdd8f293d9860ef9ae8e0fbe6d30be6e7048a0750 (patch)
tree8562ac2f6659495d17ab86443208d94c35b12440
parent244b47e6b8cac0f76fad6713ddc490a7147e7792 (diff)
downloaduserdrake-dd8f293d9860ef9ae8e0fbe6d30be6e7048a0750.tar
userdrake-dd8f293d9860ef9ae8e0fbe6d30be6e7048a0750.tar.gz
userdrake-dd8f293d9860ef9ae8e0fbe6d30be6e7048a0750.tar.bz2
userdrake-dd8f293d9860ef9ae8e0fbe6d30be6e7048a0750.tar.xz
userdrake-dd8f293d9860ef9ae8e0fbe6d30be6e7048a0750.zip
Add some heuristics to ignore system users in the 500-999 range
-rwxr-xr-xuserdrake1
1 files changed, 1 insertions, 0 deletions
diff --git a/userdrake b/userdrake
index 377ccfc..2cbe8f7 100755
--- a/userdrake
+++ b/userdrake
@@ -300,6 +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)$/);
push @UserReal, $l if $l->UserName($GetValue) =~ /^\Q$strfilt/;
}
my $i;