1 # $OpenBSD: reexec.sh,v 1.3 2004/06/25 01:32:44 djm Exp $
2 # Placed in the Public Domain.
9 SSHD_COPY=$OBJ/sshd.copy
11 # Start a sshd and then delete it
12 start_sshd_copy_zap ()
14 cp $SSHD_ORIG $SSHD_COPY
21 verbose "test config passing"
22 cp $OBJ/sshd_config $OBJ/sshd_config.orig
26 echo "InvalidXXX=no" >> $OBJ/sshd_config
30 verbose "$tid: proto $p"
31 ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
34 fail "ssh cat $DATA failed"
36 cmp ${DATA} ${COPY} || fail "corrupted copy"
40 $SUDO kill `cat $PIDFILE`
43 cp $OBJ/sshd_config.orig $OBJ/sshd_config
45 verbose "test reexec fallback"
51 verbose "$tid: proto $p"
52 ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
55 fail "ssh cat $DATA failed"
57 cmp ${DATA} ${COPY} || fail "corrupted copy"
61 $SUDO kill `cat $PIDFILE`
64 verbose "test reexec fallback without privsep"
66 cp $OBJ/sshd_config.orig $OBJ/sshd_config
67 echo "UsePrivilegeSeparation=no" >> $OBJ/sshd_config
73 verbose "$tid: proto $p"
74 ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
77 fail "ssh cat $DATA failed"
79 cmp ${DATA} ${COPY} || fail "corrupted copy"
83 $SUDO kill `cat $PIDFILE`
86 cp $OBJ/sshd_config.orig $OBJ/sshd_config