diff options
author | Eric Blake <ebb9@byu.net> | 2009-10-27 14:08:14 -0600 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-10-27 18:53:44 -0600 |
commit | 0cc0424119ec66c9005fb905cc1001a64b978ce3 (patch) | |
tree | 4fd1bf84acf34df143bcd80d65feba55b07fe345 /tests/rm/fail-eperm | |
parent | f00bbe33e41a9849351ea57c2706516d43e1e98d (diff) | |
download | coreutils-0cc0424119ec66c9005fb905cc1001a64b978ce3.tar.xz |
tests: fix PATH problems on cygwin
* tests/misc/sort-compress: Remove non-portable over-restriction
of PATH; besides, commit 3ea177e changed sort to no longer default
to gzip.
* tests/rm/fail-eperm: Untaint, rather than clear, PATH.
* tests/misc/pwd-long: Likewise. Also skip test if long path
cannot be created.
(normalize_to_cwd_relative): Use eq rather than ==, since cygwin
perl doesn't properly handle 64-bit ino_t numerically.
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"; |