[openssh-commits] [openssh] 06/13: upstream: Make ForwardAgent=yes properly first-match-wins when a
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Nov 27 08:18:22 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 d91d57bb2975a3f44fb40375d047c95cc8033329
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Thu Nov 26 19:30:34 2026 +0000
upstream: Make ForwardAgent=yes properly first-match-wins when a
later ForwardAgent=/path runs in a match block.
Anthropic ANT-2026-XZ9JOD1K
OpenBSD-Commit-ID: 8a2490344095738df9f9168cea887b9d1dcd0d67
---
readconf.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/readconf.c b/readconf.c
index 3c21bcb3b..1a5beb5bc 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.424 2026/11/02 06:49:42 dtucker Exp $ */
+/* $OpenBSD: readconf.c,v 1.425 2026/11/26 19:30:34 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1308,9 +1308,6 @@ parse_time:
break;
}
/* ForwardAgent wasn't 'yes' or 'no', assume a path */
- if (*activep && *intptr == -1)
- *intptr = 1;
-
charptr = &options->forward_agent_sock_path;
goto parse_agent_path;
@@ -2494,6 +2491,12 @@ parse_pubkey_algos:
filename, linenum, arg);
goto out;
}
+ if (*activep && opcode == oForwardAgent) {
+ /* Ignore the path if ForwardAgent was already set */
+ if (options->forward_agent != -1)
+ break;
+ options->forward_agent = 1;
+ }
if (*activep && *charptr == NULL)
*charptr = xstrdup(arg);
break;
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list