diff options
-rw-r--r-- | tests/Makefile.am | 1 | ||||
-rw-r--r-- | tests/unlink_static-0.c | 1 | ||||
-rwxr-xr-x | tests/unlink_static-1.sh | 10 | ||||
-rw-r--r-- | tests/unlink_static.at | 1 |
4 files changed, 13 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 2646228..71c2872 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -62,6 +62,7 @@ check_PROGRAMS = \ truncate-0 \ truncate64-0 \ unlink-0 \ + unlink_static-0 \ unlinkat-0 \ utime-0 \ utimensat-0 \ diff --git a/tests/unlink_static-0.c b/tests/unlink_static-0.c new file mode 100644 index 0000000..efb4c91 --- /dev/null +++ b/tests/unlink_static-0.c @@ -0,0 +1 @@ +#include "unlink-0.c" diff --git a/tests/unlink_static-1.sh b/tests/unlink_static-1.sh new file mode 100755 index 0000000..62cb6b7 --- /dev/null +++ b/tests/unlink_static-1.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# make sure we catch openat with relative path +[ "${at_xfail}" = "yes" ] && exit 77 # see trace-0 + +export SANDBOX_LOG=$PWD/sb.log +touch f +test -e f || exit 1 +adddeny "${PWD}" +unlink_static-0 -1,EPERM f +test -e sb.log -a -e f diff --git a/tests/unlink_static.at b/tests/unlink_static.at new file mode 100644 index 0000000..081d7d2 --- /dev/null +++ b/tests/unlink_static.at @@ -0,0 +1 @@ +SB_CHECK(1) |