2011-08-17 02:09:19 +00:00
|
|
|
# $OpenBSD: connect-privsep.sh,v 1.2 2011/06/30 22:44:43 markus Exp $
|
2002-05-01 03:17:33 +00:00
|
|
|
# Placed in the Public Domain.
|
|
|
|
|
|
|
|
tid="proxy connect with privsep"
|
|
|
|
|
2011-08-17 02:09:19 +00:00
|
|
|
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
2002-05-01 03:17:33 +00:00
|
|
|
echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
|
|
|
|
|
|
|
|
for p in 1 2; do
|
|
|
|
${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
fail "ssh privsep+proxyconnect protocol $p failed"
|
|
|
|
fi
|
|
|
|
done
|
2011-08-17 02:09:19 +00:00
|
|
|
|
|
|
|
cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
|
|
|
|
echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
|
|
|
|
|
|
|
|
for p in 1 2; do
|
|
|
|
${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
fail "ssh privsep/sandbox+proxyconnect protocol $p failed"
|
|
|
|
fi
|
|
|
|
done
|