blob: e7f9389816d5ed33f2320efffc4ec3f161f956bc [file] [log] [blame]
Damien Millerfaf4d802011-08-17 12:09:19 +10001# $OpenBSD: connect-privsep.sh,v 1.2 2011/06/30 22:44:43 markus Exp $
Damien Miller38cd4352002-05-01 13:17:33 +10002# Placed in the Public Domain.
3
4tid="proxy connect with privsep"
5
Damien Millerfaf4d802011-08-17 12:09:19 +10006cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
Damien Miller38cd4352002-05-01 13:17:33 +10007echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
8
9for p in 1 2; do
10 ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
11 if [ $? -ne 0 ]; then
12 fail "ssh privsep+proxyconnect protocol $p failed"
13 fi
14done
Damien Millerfaf4d802011-08-17 12:09:19 +100015
16cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
17echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
18
19for p in 1 2; do
20 ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
21 if [ $? -ne 0 ]; then
22 fail "ssh privsep/sandbox+proxyconnect protocol $p failed"
23 fi
24done