1 # $OpenBSD: connect-privsep.sh,v 1.9 2017/04/30 23:34:55 djm Exp $
2 # Placed in the Public Domain.
4 tid="proxy connect with privsep"
6 cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
7 echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
9 ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
11 fail "ssh privsep+proxyconnect failed"
14 cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
15 echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
17 ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
19 # XXX replace this with fail once sandbox has stabilised
20 warn "ssh privsep/sandbox+proxyconnect failed"
23 # Because sandbox is sensitive to changes in libc, especially malloc, retest
24 # with every malloc.conf option (and none).
25 if [ -z "TEST_MALLOC_OPTIONS" ]; then
26 mopts="C F G J R S U X < >"
28 mopts=`echo $TEST_MALLOC_OPTIONS | sed 's/./& /g'`
30 for m in '' $mopts ; do
31 env MALLOC_OPTIONS="$m" ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
33 fail "ssh privsep/sandbox+proxyconnect mopt '$m' failed"