Add a check for OpenBSD unveil()
This commit is contained in:
parent
16657e070c
commit
da225e1adc
1 changed files with 13 additions and 5 deletions
|
@ -42,13 +42,21 @@ if ! [ $OUT = "0d36a423a4e8be813fda4022f08b3844" ] ; then echo "error" ; exit 1
|
|||
OUT=$(printf "gemini://perso.pw\r\n" | ../vger -v -d var/gemini/ -l fr | tee /dev/stderr | $MD5)
|
||||
if ! [ $OUT = "7db981ce93fee268f29324912800f00d" ] ; then echo "error" ; exit 1 ; fi
|
||||
|
||||
type doas 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
# file from local directory chroot
|
||||
OUT=$(printf "gemini://perso.pw\r\n" | doas ../vger -v -d var/gemini/ -u solene -l fr | tee /dev/stderr | $MD5)
|
||||
if ! [ $OUT = "7db981ce93fee268f29324912800f00d" ] ; then echo "error" ; exit 1 ; fi
|
||||
# must fail only on OpenBSD !
|
||||
# try to escape from unveil
|
||||
if [ -f /bsd ]
|
||||
then
|
||||
OUT=$(printf "gemini://fail_on_openbsd/../../test.sh\r\n" | ../vger -d var/gemini/ -l fr | tee /dev/stderr | $MD5)
|
||||
if [ $OUT = "$( ( printf '20 text/gemini; lang=fr\r\n' ; cat $0) | $MD5)" ] ; then echo "error" ; exit 1 ; fi
|
||||
fi
|
||||
|
||||
#type doas 2>/dev/null
|
||||
#if [ $? -eq 0 ]; then
|
||||
# # file from local directory chroot
|
||||
# OUT=$(printf "gemini://perso.pw\r\n" | doas ../vger -v -d var/gemini/ -u solene -l fr | tee /dev/stderr | $MD5)
|
||||
# if ! [ $OUT = "7db981ce93fee268f29324912800f00d" ] ; then echo "error" ; exit 1 ; fi
|
||||
#fi
|
||||
|
||||
#### no -d parameter from here
|
||||
|
||||
if [ -d /var/gemini/ ]
|
||||
|
|
Loading…
Reference in a new issue