Skip to content

Commit 90f4cf2

Browse files
committed
cleanup un-taint code
1 parent b328d54 commit 90f4cf2

File tree

4 files changed

+0
-29
lines changed

4 files changed

+0
-29
lines changed

script/munin-httpd

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
2727
use strict;
2828
use warnings;
2929

30-
# Trust PERL5LIB from environment
31-
use lib map { /(.*)/ } split(/:/, ($ENV{PERL5LIB} || ''));
32-
3330
package Munin::Master::Http;
3431

3532
use HTTP::Server::Simple::CGI::PreFork;
@@ -61,7 +58,5 @@ sub handle_request
6158

6259
package main;
6360

64-
$ENV{PATH} = '/usr/bin:/bin';
65-
6661
# start the server on port 4948
6762
Munin::Master::Http->new(4948)->run(prefork => 1, max_servers => 10);

script/munin-node

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@
2626
use strict;
2727
use warnings;
2828

29-
# Trust PERL5LIB from environment
30-
use lib map { /(.*)/ } split(/:/, ($ENV{PERL5LIB} || ''));
31-
3229
use Getopt::Long;
3330

3431
use Munin::Common::Defaults;
@@ -92,11 +89,6 @@ sub main
9289
conf_file => $conffile,
9390
);
9491

95-
# Untaint $0 after Munin::Node::Server has had a chance of getting
96-
# the original value
97-
$0 =~ /([^\/]*)$/;
98-
$0 = $1;
99-
10092
return 0;
10193
}
10294

script/munin-node-configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ my $config = Munin::Node::Config->instance();
3232
my @all_families = qw/auto manual contrib/;
3333
my @default_families = qw/auto/;
3434

35-
3635
sub main
3736
{
3837
parse_args();

script/munin-run

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
use strict;
2626
use warnings;
2727

28-
# Trust PERL5LIB from environment
29-
use lib map { /(.*)/ } split(/:/, ($ENV{PERL5LIB} || ''));
30-
3128
use Getopt::Long;
3229

3330
use Munin::Common::Defaults;
@@ -47,20 +44,8 @@ my $paranoia = 0;
4744

4845
my $config = Munin::Node::Config->instance();
4946

50-
5147
sub main
5248
{
53-
# "Clean" environment to disable taint-checking on the environment. We _know_
54-
# that the environment is insecure, but we want to let admins shoot themselves
55-
# in the foot with it, if they want to.
56-
foreach my $key (keys %ENV) {
57-
$ENV{$key} =~ /^(.*)$/;
58-
$ENV{$key} = $1;
59-
}
60-
61-
$0 =~ /^(.*)$/;
62-
$0 = $1;
63-
6449
my ($plugin, $arg) = parse_args();
6550

6651
# Loads the settings from munin-node.conf.

0 commit comments

Comments
 (0)