[openssh-commits] [openssh] 57/87: upstream: make ForkAfterAuthentication=yes imply StdinNull=yes.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Oct 30 20:21:34 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 ebc833d1a1fef0afd76a2a51496f6c37573b41ab
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Fri Oct 30 06:40:58 2026 +0000
upstream: make ForkAfterAuthentication=yes imply StdinNull=yes.
Setting fork- after-auth via the commandline already did this, but if it was
done via the configuration file then stdin was being left attached and
keystrokes could end up getting sent to the server.
Anthropic ANT-2026-7CJ6YZKN
OpenBSD-Commit-ID: d4806af6626ba04bb83e185c2923b05e09adf2b9
---
readconf.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/readconf.c b/readconf.c
index 2980687e3..cf9baa988 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readconf.c,v 1.420 2026/10/30 04:14:37 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.421 2026/10/30 06:40:58 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -3046,10 +3046,13 @@ fill_default_options(Options * options)
options->request_tty = REQUEST_TTY_AUTO;
if (options->session_type == -1)
options->session_type = SESSION_TYPE_DEFAULT;
- if (options->stdin_null == -1)
- options->stdin_null = 0;
if (options->fork_after_authentication == -1)
options->fork_after_authentication = 0;
+ /* ForkAfterAuthentication implies StdinNull, same as ssh -f */
+ if (options->fork_after_authentication)
+ options->stdin_null = 1;
+ if (options->stdin_null == -1)
+ options->stdin_null = 0;
if (options->proxy_use_fdpass == -1)
options->proxy_use_fdpass = 0;
if (options->canonicalize_max_dots == -1)
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list