aboutsummaryrefslogtreecommitdiff
blob: 140d84f9ac3481cccdf732971feb97ea0e14c9c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#
# https://bugs.gentoo.org/599706
#

addwrite $PWD
rm -f deny || exit 1
touch deny || exit 1
adddeny $PWD/deny

# The sandbox doesn't log anything when it returns a junk file
# descriptor? It doesn't look like we can test the contents of
# sandbox.log here... instead, we just have to count on fchmod
# failing, which it does if you use O_RDWR, and it *should* if you use
# O_RDONLY (because that won't stop the change of permissions).
fchmod-0 $(stat --format='%#04a' $PWD/deny) $PWD/deny && exit 1

exit 0