}
$ENV{'PATH'} = join($sep,@path);
+my $NonTaintedCwd = $^O eq 'MSWin32' || $^O eq 'cygwin';
+
cleanup();
find({wanted => sub { print "ok 1\n" if $_ eq 'commonsense.t'; },
print "# $@" if $@;
#$^D = 8;
-if ($^O eq 'MSWin32') {
+if ($NonTaintedCwd) {
Skip("$^O does not taint cwd");
}
else {
eval {File::Find::find( {wanted => \&simple_wanted, untaint => 1,
untaint_skip => 1, untaint_pattern =>
qr|^(NO_MATCH)$|}, topdir('fa') );};
- Check( $@ =~ m|insecure cwd| );
+ if ($NonTaintedCwd) {
+ Skip("$^O does not taint cwd");
+ }
+ else {
+ Check( $@ =~ m|insecure cwd| );
+ }
chdir($cwd_untainted);
}
my $Is_MSWin32 = $^O eq 'MSWin32';
my $Is_NetWare = $^O eq 'NetWare';
my $Is_Dos = $^O eq 'dos';
+my $Is_Cygwin = $^O eq 'cygwin';
my $Invoke_Perl = $Is_VMS ? 'MCR Sys$Disk:[]Perl.' :
($Is_MSWin32 ? '.\perl' :
($Is_NetWare ? 'perl' : './perl'));
delete @ENV{@MoreEnv};
$ENV{TERM} = 'dumb';
+ if ($Is_Cygwin) {
+ system("/usr/bin/cp /usr/bin/cygwin1.dll .") &&
+ die "$0: failed to cp cygwin1.dll: $!\n";
+ END { unlink "cygwin1.dll" } # yes, done for all platforms...
+ }
+
test 1, eval { `$echo 1` } eq "1\n";
if ($Is_MSWin32 || $Is_NetWare || $Is_VMS || $Is_Dos) {