diff options
author | Mike Guy <mjtg@cam.ac.uk> | 2001-06-29 15:56:49 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-29 13:07:57 +0000 |
commit | a1b073b760deba4c7afc6baaa2225bd385906390 (patch) | |
tree | ecbf35cecf05bc302d03b9e7bf7df94ffd0bd2ca /lib | |
parent | 0661e9a4f58f56c330261e7c3fa4dc38e42204b1 (diff) | |
download | perl-a1b073b760deba4c7afc6baaa2225bd385906390.tar.gz |
Re: perl@10967, File::Find, and Cwd
Message-Id: <E15FylN-0004LT-00@draco.cus.cam.ac.uk>
p4raw-id: //depot/perl@11025
Diffstat (limited to 'lib')
-rw-r--r-- | lib/File/Find/taint.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/File/Find/taint.t b/lib/File/Find/taint.t index cdd75de7d8..1e1258e184 100644 --- a/lib/File/Find/taint.t +++ b/lib/File/Find/taint.t @@ -24,6 +24,16 @@ else { print "1..27\n"; } use File::Find; use File::Spec; use Cwd; +use Config; + +# Remove insecure directories from PATH +my @path; +my $sep = $Config{path_sep}; +foreach my $dir (split(/$sep/,$ENV{'PATH'})) + { + push(@path,$dir) unless (stat $dir)[2] & 0002; + } +$ENV{'PATH'} = join($sep,@path); my $NonTaintedCwd = $^O eq 'MSWin32' || $^O eq 'cygwin'; |