aboutsummaryrefslogtreecommitdiff
blob: ef4de0ea003e537792cd88384ba145f963441141 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh
# make sure symlinks with chown() work properly

addwrite $PWD

rm -rf deny link
(
set -e
mkdir deny
touch deny/file
ln -s deny/file link
) || exit 1

# this *should not* trigger a sandbox violation
chown-0 0 link ${SB_UID} ${SB_GID} || exit 1

# this *should* trigger a sandbox violation
adddeny $PWD/deny
export SANDBOX_LOG=$PWD/sb.log
unset SANDBOX_VERBOSE
chown-0 -1 link ${SB_UID} ${SB_GID} || exit 1
test -s sb.log