mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-17 23:54:35 +00:00
d1bd184046
The warn() function is only used in one place in portable and does not exist upstream. Upgrade the only instance it's used to fail() (the privsep/sandbox+proxyconnect, from back when that was new) and remove the now-unused function.
35 lines
992 B
Bash
35 lines
992 B
Bash
# $OpenBSD: connect-privsep.sh,v 1.9 2017/04/30 23:34:55 djm 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
|
|
|
|
${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
if [ $? -ne 0 ]; then
|
|
fail "ssh privsep+proxyconnect failed"
|
|
fi
|
|
|
|
cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
|
|
echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
|
|
|
|
${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
if [ $? -ne 0 ]; then
|
|
fail "ssh privsep/sandbox+proxyconnect failed"
|
|
fi
|
|
|
|
# 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
|
|
env MALLOC_OPTIONS="$m" ${SSH} -F $OBJ/ssh_proxy 999.999.999.999 true
|
|
if [ $? -ne 0 ]; then
|
|
fail "ssh privsep/sandbox+proxyconnect mopt '$m' failed"
|
|
fi
|
|
done
|