diff options
Diffstat (limited to 'tests/rdsquashfs/pathtraversal.sh.in')
-rw-r--r-- | tests/rdsquashfs/pathtraversal.sh.in | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/rdsquashfs/pathtraversal.sh.in b/tests/rdsquashfs/pathtraversal.sh.in new file mode 100644 index 0000000..6dd9fab --- /dev/null +++ b/tests/rdsquashfs/pathtraversal.sh.in @@ -0,0 +1,12 @@ +#!/bin/sh + +RDSQFS="@abs_top_builddir@/rdsquashfs" +REFFILE="@abs_top_srcdir@/tests/rdsquashfs/pathtraversal.sqfs" +GOTCHA="/tmp/gotcha.txt" + +if "$RDSQFS" -u / -p . "$REFFILE"; then + if [ -e "$GOTCHA" ]; then + echo "Found $GOTCHA which should not be there" + exit 1 + fi +fi |