summaryrefslogtreecommitdiff
path: root/tests/rm/fail-eperm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rm/fail-eperm')
-rwxr-xr-xtests/rm/fail-eperm10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm
index 36192c2e5..16811c2ff 100755
--- a/tests/rm/fail-eperm
+++ b/tests/rm/fail-eperm
@@ -34,11 +34,11 @@ $ENV{LC_ALL} = 'C';
# Set up a safe, well-known environment
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";
+
+# Taint checking requires a sanitized $PATH. This script performs no $PATH
+# search, so on most Unix-based systems, it is fine simply to clear $ENV{PATH}.
+# However, on Cygwin, it's used to find cygwin.dll, so set it.
+$ENV{PATH} = '/bin:/usr/bin';
my @dir_list = qw(/tmp /var/tmp /usr/tmp);
my $rm = "$ENV{abs_top_builddir}/src/rm";