diff options
Diffstat (limited to 'tests/rm/fail-eperm')
-rwxr-xr-x | tests/rm/fail-eperm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm index 9ccb913a6..36192c2e5 100755 --- a/tests/rm/fail-eperm +++ b/tests/rm/fail-eperm @@ -32,8 +32,13 @@ my $verbose = $ENV{VERBOSE} && $ENV{VERBOSE} eq 'yes'; $ENV{LC_ALL} = 'C'; # Set up a safe, well-known environment -delete @ENV{qw(BASH_ENV CDPATH ENV PATH)}; +delete @ENV{qw(BASH_ENV CDPATH ENV)}; $ENV{IFS} = ''; +# PATH is tricky - we can't just clear it, or cygwin will fail. But we +# can't use it as-is, or taint checking in `` will stop us. For this +# script, it is enough to scrub the incoming $PATH first. +$ENV{'PATH'} =~ /(.*)/; +$ENV{'PATH'} = "$1"; my @dir_list = qw(/tmp /var/tmp /usr/tmp); my $rm = "$ENV{abs_top_builddir}/src/rm"; |