Skip to content

Commit 819af6d

Browse files
committed
tests(tar) add and update symlink test files
tests/integration/archive/tar/__input__/symlinks.tar: test/ |-- bin | `-- busybox `-- sbin |-- cp -> /test/bin/busybox |-- find -> ../bin/../bin/busybox |-- ln -> /test/bin/../bin/busybox |-- ls -> ../bin/busybox |-- mv -> ../../bin/busybox `-- rm -> ../../../bin/busybox is extracted as tests/integration/archive/tar/__output__/symlinks.tar_extract/ └── test ├── bin │ └── busybox └── sbin ├── cp -> ../bin/busybox ├── find -> ../bin/busybox ├── ln -> ../bin/busybox ├── ls -> ../bin/busybox └── mv -> ../../bin/busybox Please note, that `rm` is missing, as that is a path traversal attempt. ---- The symlinks.tar test file is created with this script in a docker container: rm -rf /test symlinks.tar mkdir -p /test/bin echo binary > /test/bin/busybox mkdir -p /test/sbin ln -s ../bin/busybox /test/sbin/ls ln -s ../bin/../bin/busybox /test/sbin/find ln -s ../../bin/busybox /test/sbin/mv ln -s ../../../bin/busybox /test/sbin/rm ln -s /test/bin/busybox /test/sbin/cp ln -s /test/bin/../bin/busybox /test/sbin/ln tar cPf /symlinks.tar /test/ tar tvPf /symlinks.tar
1 parent 3f5e1cb commit 819af6d

File tree

7 files changed

+11
-0
lines changed

7 files changed

+11
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:152c7a03b3b3276f8a7527bfde01f26b0c4f2ae3f705a6deac0183d8bac2ba1c
3+
size 10240
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:58eaf5a78d580f5dbd49d31a5b733094169b31bfdf49055b74bcac2877d8f58c
3+
size 7
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../bin/busybox
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../bin/busybox
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../bin/busybox
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../bin/busybox
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../bin/busybox

0 commit comments

Comments
 (0)