From 73cdcc98bee6349589dfebc09964c838b7cd807f Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Tue, 11 May 2021 14:27:40 +0200 Subject: [PATCH] report: set timeout and PATH env only locally Signed-off-by: Thomas Lamprecht --- PVE/Report.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/Report.pm b/PVE/Report.pm index b3373832..6037ba9d 100644 --- a/PVE/Report.pm +++ b/PVE/Report.pm @@ -5,9 +5,6 @@ use warnings; use PVE::Tools; -$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; - -my $cmd_timeout = 10; # generous timeout my $init_report_cmds = sub { # NOTE: always add new sections to the report_order array! @@ -136,6 +133,9 @@ sub generate { $report .= shift . "\n"; }; + local $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin'; + my $cmd_timeout = 10; # generous timeout + my $run_cmd_params = { outfunc => $record_output, errfunc => $record_output,