aboutsummaryrefslogtreecommitdiff
path: root/plugins-scripts/check_file_age.pl
diff options
context:
space:
mode:
authorGravatar awiddersheim <awiddersheim@hotmail.com> 2013-10-22 10:33:56 -0400
committerGravatar awiddersheim <awiddersheim@hotmail.com> 2013-10-22 10:33:56 -0400
commit0a3252d88d148a8cb21774cd3ae6a1cb1fbb004c (patch)
tree756f8d4b09eb6ee3c2ef75301a7027e9a42509dc /plugins-scripts/check_file_age.pl
parentf6576c6db4eeb655f16a71286757e4a93792887d (diff)
downloadmonitoring-plugins-0a3252d88d148a8cb21774cd3ae6a1cb1fbb004c.tar.gz
Fix trusted path
When configuring the plugins you have the option to specify a trusted path with --with-trusted-path. This option seems to have been deprecated at some point for unknown reasons and had typically had no affect. This commit makes this option work again for those who have a desire to use it. There should be no affect on those who have not chosen to specify a trusted path.
Diffstat (limited to 'plugins-scripts/check_file_age.pl')
-rwxr-xr-xplugins-scripts/check_file_age.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins-scripts/check_file_age.pl b/plugins-scripts/check_file_age.pl
index dcd5efab..37bbe86f 100755
--- a/plugins-scripts/check_file_age.pl
+++ b/plugins-scripts/check_file_age.pl
@@ -37,6 +37,10 @@ my ($result, $message, $age, $size, $st);
$PROGNAME="check_file_age";
+$ENV{'PATH'}='@trusted_path@';
+$ENV{'BASH_ENV'}='';
+$ENV{'ENV'}='';
+
$opt_w = 240;
$opt_c = 600;
$opt_W = 0;