[openssh-commits] [openssh] 12/13: upstream: check ForwardAgent first-match-winsicity

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Nov 27 08:18:28 AEDT 2026


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

djm pushed a commit to branch master
in repository openssh.

commit ded40d4dce37a35e028a580de315b2c2ebc90f42
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Thu Nov 26 19:31:25 2026 +0000

    upstream: check ForwardAgent first-match-winsicity
    
    Anthropic ANT-2026-XZ9JOD1K
    
    OpenBSD-Regress-ID: 299c0dc40bbcd2ec70c276af6f42cf90959b8810
---
 regress/sshcfgparse.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/regress/sshcfgparse.sh b/regress/sshcfgparse.sh
index 784e84134..f451882a6 100644
--- a/regress/sshcfgparse.sh
+++ b/regress/sshcfgparse.sh
@@ -1,4 +1,4 @@
-#	$OpenBSD: sshcfgparse.sh,v 1.12 2026/10/30 08:12:58 djm Exp $
+#	$OpenBSD: sshcfgparse.sh,v 1.13 2026/11/26 19:31:25 djm Exp $
 #	Placed in the Public Domain.
 
 tid="ssh config parse"
@@ -89,6 +89,18 @@ f=`${SSH} -GF none -oforwardagent=yes host | awk '/^forwardagent /{print$2}'`
 expect_result_present "$f" "yes"
 f=`${SSH} -GF none '-oforwardagent=SSH_AUTH_SOCK.forward' host | awk '/^forwardagent /{print$2}'`
 expect_result_present "$f" "SSH_AUTH_SOCK.forward"
+# First obtained value wins, whether it is a flag or a path.
+for first in yes no SSH_AUTH_SOCK.first ; do
+	for second in yes no SSH_AUTH_SOCK.second ; do
+		f=`${SSH} -GF none -oforwardagent=$first \
+		    -oforwardagent=$second host | \
+		    awk '/^forwardagent /{print$2}'`
+		expect_result_present "$f" "$first"
+	done
+done
+f=`${SSH} -GF none -A -oforwardagent=SSH_AUTH_SOCK.forward host | \
+    awk '/^forwardagent /{print$2}'`
+expect_result_present "$f" "yes"
 
 verbose "command line override"
 cat >$OBJ/ssh_config.0 <<EOD

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


More information about the openssh-commits mailing list