Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liblongpath
liblongpath-rsync
Commits
4eea7793
Commit
4eea7793
authored
Apr 09, 2002
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Doc
Try symlinks with an empty target
parent
67684d03
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
unsafe-byname.test
testsuite/unsafe-byname.test
+10
-3
No files found.
testsuite/unsafe-byname.test
View file @
4eea7793
...
@@ -7,6 +7,11 @@
...
@@ -7,6 +7,11 @@
.
$srcdir
/
testsuite
/
rsync
.
fns
.
$srcdir
/
testsuite
/
rsync
.
fns
test_unsafe
()
{
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"
result
=
`"$TOOLDIR/t_unsafe" "$1" "$2"`
||
test_fail
"Failed to check $1 $2"
if
[
"
$result
"
!=
"$3"
]
if
[
"
$result
"
!=
"$3"
]
then
then
...
@@ -24,9 +29,11 @@ test_unsafe /etc/passwd from unsafe
...
@@ -24,9 +29,11 @@ test_unsafe /etc/passwd from unsafe
test_unsafe
//../etc/passwd from unsafe
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
safe
test_unsafe
../
foo
from
unsafe
test_unsafe
../
foo
from
unsafe
test_unsafe
../
dest
from
/
dir
safe
test_unsafe
../
dest
from
/
dir
safe
test_unsafe
''
from
unsafe
# Based on tests from unsafe-links by Vladimr Michl
# Based on tests from unsafe-links by Vladimr Michl
test_unsafe
../../
unsafe
/
unsafefile
from
/
safe
unsafe
test_unsafe
../../
unsafe
/
unsafefile
from
/
safe
unsafe
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment