diff options
author | Bernhard Voelker <mail@bernhard-voelker.de> | 2021-11-26 23:43:54 +0100 |
---|---|---|
committer | Bernhard Voelker <mail@bernhard-voelker.de> | 2021-11-27 23:04:16 +0100 |
commit | 94e91f60fb28cc25806cd80ee0d7bfec319a6894 (patch) | |
tree | 03f8f368c3a882cc426fdb615a3a9b1e7e4e1fd2 | |
parent | 0dd5eaa32909befd7f796ee837b21f4f5a63f3e7 (diff) | |
download | findutils-94e91f60fb28cc25806cd80ee0d7bfec319a6894.tar.gz |
tests: skip -execdir test if PATH contains unsafe directory
* find/testsuite/find.gnu/sv-bug-27563-execdir.exp: Guard test by
'safe_path' condition to avoid false-positive failures in case the
PATH variable contains the current directory '.' ... which lets the
`find -execdir` action fail with an error diagnostic.
Reported by Paxsali <akis.kapo@googlemail.com> in
https://savannah.gnu.org/bugs/?60383
-rw-r--r-- | find/testsuite/find.gnu/sv-bug-27563-execdir.exp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/find/testsuite/find.gnu/sv-bug-27563-execdir.exp b/find/testsuite/find.gnu/sv-bug-27563-execdir.exp index c67fc88d..b53c8fd7 100644 --- a/find/testsuite/find.gnu/sv-bug-27563-execdir.exp +++ b/find/testsuite/find.gnu/sv-bug-27563-execdir.exp @@ -1,6 +1,8 @@ -# tests for Savannah bug 27563 (result of find -L -exec ls {} \;) -exec rm -rf tmp -exec mkdir tmp -exec touch tmp/yyyy -find_start p {-L tmp -name yyyy -execdir ls \{\} \; } -exec rm -rf tmp +if { [ safe_path ] } { + # tests for Savannah bug 27563 (result of find -L -exec ls {} \;) + exec rm -rf tmp + exec mkdir tmp + exec touch tmp/yyyy + find_start p {-L tmp -name yyyy -execdir ls \{\} \; } + exec rm -rf tmp +} |