Sanitize the shell environment before loading modules
This commit is contained in:
parent
e8ee72a352
commit
6b81c68666
@ -10,6 +10,12 @@
|
||||
# safety guards
|
||||
use strict;
|
||||
|
||||
BEGIN {
|
||||
# secure shell
|
||||
$ENV{'PATH'} = '/bin:/usr/bin';
|
||||
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
|
||||
}
|
||||
|
||||
# includes
|
||||
use IO::Socket;
|
||||
use POSIX;
|
||||
@ -38,10 +44,6 @@ foreach my $sig_name ( split( /\s/, $Config{sig_name} ) )
|
||||
$sig_num{$sig_name} = $i++;
|
||||
}
|
||||
|
||||
# secure shell
|
||||
$ENV{'PATH'} = '/bin:/usr/bin';
|
||||
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
|
||||
|
||||
# version
|
||||
my $VERSION = "1.0";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user