mirror of
https://github.com/openssh/openssh-portable.git
synced 2026-11-06 05:16:43 +00:00
upstream: verify that ChannelTimeout in a Match block is effective
OpenBSD-Regress-ID: 30770cad71ca060aaaa05e4bdd0ea8941b768c6b
This commit is contained in:
1 parent
dd4556dc75
commit
fed6e6fea6
1 file changed
+12
-1
@@ -1,4 +1,4 @@
|
||||
# $OpenBSD: channel-timeout.sh,v 1.2 2024/01/09 22:19:36 djm Exp $
|
||||
# $OpenBSD: channel-timeout.sh,v 1.3 2026/07/21 06:18:23 djm Exp $
|
||||
# Placed in the Public Domain.
|
||||
|
||||
tid="channel timeout"
|
||||
@@ -47,6 +47,17 @@ if [ $r -ne 255 ]; then
|
||||
fail "ssh returned unexpected error code $r"
|
||||
fi
|
||||
|
||||
verbose "match command timeout"
|
||||
(cat $OBJ/sshd_proxy.orig ;
|
||||
echo "match user *" ;
|
||||
echo "ChannelTimeout session:command=1") \
|
||||
> $OBJ/sshd_proxy
|
||||
${SSH} -F $OBJ/ssh_proxy somehost "sleep 5 ; exit 23"
|
||||
r=$?
|
||||
if [ $r -ne 255 ]; then
|
||||
fail "ssh returned unexpected error code $r"
|
||||
fi
|
||||
|
||||
verbose "command long timeout"
|
||||
(cat $OBJ/sshd_proxy.orig ; echo "ChannelTimeout session:command=60") \
|
||||
> $OBJ/sshd_proxy
|
||||
|
||||
Reference in new issue
Block a user