aboutsummaryrefslogtreecommitdiff
blob: 00a948e061ac500e7bc51144768d746862b46ae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# make sure we catch openat with absolute path
[ "${at_xfail}" = "yes" ] && exit 77 # see trace-0

addwrite $PWD
openat_static-0 3 AT_FDCWD ok "O_WRONLY|O_CREAT" 0666 || exit 1
openat_static-0 3 AT_FDCWD ok O_RDONLY 0666 || exit 1

export SANDBOX_LOG=$PWD/sb.log
mkdir deny || exit 1
adddeny $PWD/deny
openat_static-0 -1 AT_FDCWD $PWD/deny/not-ok "O_WRONLY|O_CREAT" 0666
test -e sb.log