mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-11-24 19:53:24 +08:00
- djm@cvs.openbsd.org 2004/10/08 02:01:50
[reexec.sh] shrink and tidy; ok dtucker@
This commit is contained in:
parent
3206e57e93
commit
71b5643598
@ -32,6 +32,9 @@
|
||||
- david@cvs.openbsd.org 2004/07/09 19:45:43
|
||||
[Makefile]
|
||||
add a missing CLEANFILES used in the re-exec test
|
||||
- djm@cvs.openbsd.org 2004/10/08 02:01:50
|
||||
[reexec.sh]
|
||||
shrink and tidy; ok dtucker@
|
||||
|
||||
20041203
|
||||
- (dtucker) OpenBSD CVS Sync
|
||||
@ -1905,4 +1908,4 @@
|
||||
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
|
||||
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
|
||||
|
||||
$Id: ChangeLog,v 1.3593 2004/12/06 12:04:57 dtucker Exp $
|
||||
$Id: ChangeLog,v 1.3594 2004/12/06 12:05:52 dtucker Exp $
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: reexec.sh,v 1.4 2004/06/26 06:16:07 djm Exp $
|
||||
# $OpenBSD: reexec.sh,v 1.5 2004/10/08 02:01:50 djm Exp $
|
||||
# Placed in the Public Domain.
|
||||
|
||||
tid="reexec tests"
|
||||
@ -9,33 +9,37 @@ SSHD_ORIG=$SSHD
|
||||
SSHD_COPY=$OBJ/sshd
|
||||
|
||||
# Start a sshd and then delete it
|
||||
start_sshd_copy_zap ()
|
||||
start_sshd_copy ()
|
||||
{
|
||||
cp $SSHD_ORIG $SSHD_COPY
|
||||
SSHD=$SSHD_COPY
|
||||
start_sshd
|
||||
rm -f $SSHD_COPY
|
||||
SSHD=$SSHD_ORIG
|
||||
}
|
||||
|
||||
# Do basic copy tests
|
||||
copy_tests ()
|
||||
{
|
||||
rm -f ${COPY}
|
||||
for p in 1 2; do
|
||||
verbose "$tid: proto $p"
|
||||
${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
|
||||
cat ${DATA} > ${COPY}
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "ssh cat $DATA failed"
|
||||
fi
|
||||
cmp ${DATA} ${COPY} || fail "corrupted copy"
|
||||
rm -f ${COPY}
|
||||
done
|
||||
}
|
||||
|
||||
verbose "test config passing"
|
||||
|
||||
cp $OBJ/sshd_config $OBJ/sshd_config.orig
|
||||
|
||||
start_sshd
|
||||
|
||||
echo "InvalidXXX=no" >> $OBJ/sshd_config
|
||||
|
||||
rm -f ${COPY}
|
||||
for p in 1 2; do
|
||||
verbose "$tid: proto $p"
|
||||
${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
|
||||
cat ${DATA} > ${COPY}
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "ssh cat $DATA failed"
|
||||
fi
|
||||
cmp ${DATA} ${COPY} || fail "corrupted copy"
|
||||
rm -f ${COPY}
|
||||
done
|
||||
copy_tests
|
||||
|
||||
$SUDO kill `cat $PIDFILE`
|
||||
rm -f $PIDFILE
|
||||
@ -44,19 +48,10 @@ cp $OBJ/sshd_config.orig $OBJ/sshd_config
|
||||
|
||||
verbose "test reexec fallback"
|
||||
|
||||
start_sshd_copy_zap
|
||||
start_sshd_copy
|
||||
rm -f $SSHD_COPY
|
||||
|
||||
rm -f ${COPY}
|
||||
for p in 1 2; do
|
||||
verbose "$tid: proto $p"
|
||||
${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
|
||||
cat ${DATA} > ${COPY}
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "ssh cat $DATA failed"
|
||||
fi
|
||||
cmp ${DATA} ${COPY} || fail "corrupted copy"
|
||||
rm -f ${COPY}
|
||||
done
|
||||
copy_tests
|
||||
|
||||
$SUDO kill `cat $PIDFILE`
|
||||
rm -f $PIDFILE
|
||||
@ -66,22 +61,12 @@ verbose "test reexec fallback without privsep"
|
||||
cp $OBJ/sshd_config.orig $OBJ/sshd_config
|
||||
echo "UsePrivilegeSeparation=no" >> $OBJ/sshd_config
|
||||
|
||||
start_sshd_copy_zap
|
||||
start_sshd_copy
|
||||
rm -f $SSHD_COPY
|
||||
|
||||
rm -f ${COPY}
|
||||
for p in 1 2; do
|
||||
verbose "$tid: proto $p"
|
||||
${SSH} -nqo "Protocol=$p" -F $OBJ/ssh_config somehost \
|
||||
cat ${DATA} > ${COPY}
|
||||
if [ $? -ne 0 ]; then
|
||||
fail "ssh cat $DATA failed"
|
||||
fi
|
||||
cmp ${DATA} ${COPY} || fail "corrupted copy"
|
||||
rm -f ${COPY}
|
||||
done
|
||||
copy_tests
|
||||
|
||||
$SUDO kill `cat $PIDFILE`
|
||||
rm -f $PIDFILE
|
||||
|
||||
cp $OBJ/sshd_config.orig $OBJ/sshd_config
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user