mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-19 08:34:32 +00:00
7da751d8b0
Clean up MALLOC_OPTIONS. For the unittests, move MALLOC_OPTIONS and TEST_ENV to unittets/Makefile.inc. ok otto Upstream-Regress-ID: 890d497e0a38eeddfebb11cc429098d76cf29f12
42 lines
1.2 KiB
Bash
42 lines
1.2 KiB
Bash
# $OpenBSD: connect-privsep.sh,v 1.8 2016/11/01 13:43:27 tb Exp $
|
|
# Placed in the Public Domain.
|
|
|
|
tid="proxy connect with privsep"
|
|
|
|
cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
|
|
echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
|
|
|
|
for p in ${SSH_PROTOCOLS}; 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
|
|
|
|
cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
|
|
echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
|
|
|
|
for p in ${SSH_PROTOCOLS}; do
|
|
${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
if [ $? -ne 0 ]; then
|
|
# XXX replace this with fail once sandbox has stabilised
|
|
warn "ssh privsep/sandbox+proxyconnect protocol $p failed"
|
|
fi
|
|
done
|
|
|
|
# Because sandbox is sensitive to changes in libc, especially malloc, retest
|
|
# with every malloc.conf option (and none).
|
|
if [ -z "TEST_MALLOC_OPTIONS" ]; then
|
|
mopts="C F G J R S U X < >"
|
|
else
|
|
mopts=`echo $TEST_MALLOC_OPTIONS | sed 's/./& /g'`
|
|
fi
|
|
for m in '' $mopts ; do
|
|
for p in ${SSH_PROTOCOLS}; do
|
|
env MALLOC_OPTIONS="$m" ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
if [ $? -ne 0 ]; then
|
|
fail "ssh privsep/sandbox+proxyconnect protocol $p mopt '$m' failed"
|
|
fi
|
|
done
|
|
done
|