[regress/Makefile regress/login-timeout.sh]
     Add regression test for LoginGraceTime; ok markus@
This commit is contained in:
Darren Tucker 2004-02-29 20:30:17 +11:00
parent effc84ce5b
commit 017fd61a92
3 changed files with 35 additions and 2 deletions

View File

@ -15,6 +15,9 @@
[dh.c]
Reset bit counter at the right time, fixes debug output in the case where
the DH group is rejected. ok markus@
- dtucker@cvs.openbsd.org 2004/02/17 08:23:20
[regress/Makefile regress/login-timeout.sh]
Add regression test for LoginGraceTime; ok markus@
20040226
- (bal) KNF our sshlogin.c even if the code looks nothing like upstream
@ -820,4 +823,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.3264 2004/02/29 09:15:08 dtucker Exp $
$Id: ChangeLog,v 1.3265 2004/02/29 09:30:17 dtucker Exp $

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.26 2003/10/11 11:49:49 dtucker Exp $
# $OpenBSD: Makefile,v 1.27 2004/02/17 08:23:20 dtucker Exp $
REGRESS_TARGETS= t1 t2 t3 t4 t5 t6 t7 t-exec
tests: $(REGRESS_TARGETS)
@ -21,6 +21,7 @@ LTESTS= connect \
broken-pipe \
try-ciphers \
yes-head \
login-timeout \
agent \
agent-getpeereid \
agent-timeout \

29
regress/login-timeout.sh Normal file
View File

@ -0,0 +1,29 @@
# $OpenBSD: login-timeout.sh,v 1.1 2004/02/17 08:23:20 dtucker Exp $
# Placed in the Public Domain.
tid="connect after login grace timeout"
trace "test login grace with privsep"
echo "LoginGraceTime 10s" >> $OBJ/sshd_config
echo "MaxStartups 1" >> $OBJ/sshd_config
start_sshd
(echo SSH-2.0-fake; sleep 60) | telnet localhost ${PORT} >/dev/null 2>&1 &
sleep 15
${SSH} -F $OBJ/ssh_config somehost true
if [ $? -ne 0 ]; then
fail "ssh connect after login grace timeout failed with privsep"
fi
kill `cat $PIDFILE`
trace "test login grace without privsep"
echo "UsePrivilegeSeparation no" >>sshd_config
start_sshd
(echo SSH-2.0-fake; sleep 60) | telnet localhost ${PORT} >/dev/null 2>&1 &
sleep 15
${SSH} -F $OBJ/ssh_config somehost true
if [ $? -ne 0 ]; then
fail "ssh connect after login grace timeout failed without privsep"
fi