From 4eea7793ea7f3a2b336aa68dc778ce7f9ee5cdbb Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Tue, 9 Apr 2002 04:49:42 +0000 Subject: [PATCH] Doc Try symlinks with an empty target --- testsuite/unsafe-byname.test | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/testsuite/unsafe-byname.test b/testsuite/unsafe-byname.test index 2217f076..47809dcb 100644 --- a/testsuite/unsafe-byname.test +++ b/testsuite/unsafe-byname.test @@ -7,6 +7,11 @@ . $srcdir/testsuite/rsync.fns test_unsafe() { + # $1 is the target of a symlink + # $2 is the directory we're copying + # $3 is the expected outcome: "safe" if the link lies within $2, + # or "unsafe" otherwise + result=`"$TOOLDIR/t_unsafe" "$1" "$2"` || test_fail "Failed to check $1 $2" if [ "$result" != "$3" ] then @@ -24,9 +29,11 @@ test_unsafe /etc/passwd from unsafe test_unsafe //../etc/passwd from unsafe test_unsafe //./etc/passwd from unsafe -test_unsafe ./foo from safe -test_unsafe ../foo from unsafe -test_unsafe ../dest from/dir safe +test_unsafe ./foo from safe +test_unsafe ../foo from unsafe +test_unsafe ../dest from/dir safe + +test_unsafe '' from unsafe # Based on tests from unsafe-links by VladimĂ­r Michl test_unsafe ../../unsafe/unsafefile from/safe unsafe -- 2.34.1