$pre_process, $post_process, $dangling_symlinks);
local($dir, $name, $fullname, $prune);
- my $cwd = $wanted->{bydepth} ? Cwd::fastcwd() : Cwd::cwd();
+ my $cwd = $wanted->{bydepth} ? Cwd::fastcwd() : Cwd::getcwd();
my $cwd_untainted = $cwd;
my $check_t_cwd = 1;
$wanted_callback = $wanted->{wanted};
use Cwd;
-my $NonTaintedCwd = $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'os2';
-
cleanup();
find({wanted => sub { print "ok 1\n" if $_ eq 'commonsense.t'; },
print "# $@" if $@;
#$^D = 8;
-if ($NonTaintedCwd) {
- Skip("$^O does not taint cwd");
- }
-else {
- Check( $@ =~ m|insecure cwd| );
-}
+Check( $@ =~ m|insecure cwd| );
+
chdir($cwd_untainted);
eval {File::Find::find( {wanted => \&simple_wanted, untaint => 1,
untaint_skip => 1, untaint_pattern =>
qr|^(NO_MATCH)$|}, topdir('fa') );};
- if ($NonTaintedCwd) {
- Skip("$^O does not taint cwd");
- }
- else {
- Check( $@ =~ m|insecure cwd| );
- }
+ Check( $@ =~ m|insecure cwd| );
+
chdir($cwd_untainted);
}