1 # $OpenBSD: reexec.sh,v 1.7 2013/05/17 10:23:52 dtucker Exp $
2 # Placed in the Public Domain.
9 # Start a sshd and then delete it
12 cp $SSHD_ORIG $SSHD_COPY
23 verbose "$tid: proto $p"
24 ${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
27 fail "ssh cat $DATA failed"
29 cmp ${DATA} ${COPY} || fail "corrupted copy"
34 verbose "test config passing"
36 cp $OBJ/sshd_config $OBJ/sshd_config.orig
38 echo "InvalidXXX=no" >> $OBJ/sshd_config
42 $SUDO kill `$SUDO cat $PIDFILE`
45 cp $OBJ/sshd_config.orig $OBJ/sshd_config
47 # cygwin can't fork a deleted binary
48 if [ "$os" != "cygwin" ]; then
50 verbose "test reexec fallback"
57 $SUDO kill `$SUDO cat $PIDFILE`
60 verbose "test reexec fallback without privsep"
62 cp $OBJ/sshd_config.orig $OBJ/sshd_config
63 echo "UsePrivilegeSeparation=no" >> $OBJ/sshd_config
70 $SUDO kill `$SUDO cat $PIDFILE`