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