[openssh-commits] [openssh] 03/03: upstream: test MaxStatups idempotency; ok dtucker@

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Sep 2 11:07:45 AEST 2025


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit 19f7cb39eecb4b8f768f37e8294dc3a9142e022b
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Mon Sep 1 23:55:29 2025 +0000

    upstream: test MaxStatups idempotency; ok dtucker@
    
    OpenBSD-Regress-ID: b5d713c2709000fa5e41d82c0cf8627e13cb43f9
---
 regress/cfgparse.sh | 19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

diff --git a/regress/cfgparse.sh b/regress/cfgparse.sh
index a9e5c6b09..fc0afb0ce 100644
--- a/regress/cfgparse.sh
+++ b/regress/cfgparse.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: cfgparse.sh,v 1.7 2018/05/11 03:51:06 dtucker Exp $
+#	$OpenBSD: cfgparse.sh,v 1.8 2025/09/01 23:55:29 djm Exp $
 #	Placed in the Public Domain.
 
 tid="sshd config parse"
@@ -51,7 +51,7 @@ listenaddress ::1
 EOD
 
 ($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
- grep 'listenaddress ' >$OBJ/sshd_config.2 &&
+ grep '^listenaddress ' >$OBJ/sshd_config.2 &&
  diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
  fail "listenaddress order 1"
 # test 2: listenaddress first
@@ -67,9 +67,22 @@ listenaddress ::1
 EOD
 
 ($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
- grep 'listenaddress ' >$OBJ/sshd_config.2 &&
+ grep '^listenaddress ' >$OBJ/sshd_config.2 &&
  diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
  fail "listenaddress order 2"
 
+# Check idempotence of MaxStartups
+verbose "maxstartups idempotent"
+echo "maxstartups 1:2:3" > sshd_config.0
+cat > $OBJ/sshd_config.1 <<EOD
+${SSHD_KEYS}
+MaxStartups 1:2:3
+MaxStartups 8:16:32
+EOD
+($SUDO ${SSHD} -T -f $OBJ/sshd_config.1 | \
+ grep '^maxstartups ' >$OBJ/sshd_config.2 &&
+ diff $OBJ/sshd_config.0 $OBJ/sshd_config.2) || \
+ fail "maxstartups idempotence"
+
 # cleanup
 rm -f $OBJ/sshd_config.[012]

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list