summaryrefslogtreecommitdiff
path: root/mux.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2021-07-23 04:00:59 +0000
committerDamien Miller <djm@mindrot.org>2021-07-23 14:07:19 +1000
commite0c5088f1c96a145eb6ea1dee438010da78f9ef5 (patch)
treebf1fe4b7bca8439d4523466cb6d879581115a5ee /mux.c
parente3957e21ffdc119d6d04c0b1686f8e2fe052f5ea (diff)
downloadopenssh-git-e0c5088f1c96a145eb6ea1dee438010da78f9ef5.tar.gz
upstream: Add a StdinNull directive to ssh_config(5) that allows
the config file to do the same thing as -n does on the ssh(1) commandline. Patch from Volker Diels-Grabsch via GHPR231; ok dtucker OpenBSD-Commit-ID: 66ddf3f15c76796d4dcd22ff464aed1edd62468e
Diffstat (limited to 'mux.c')
-rw-r--r--mux.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mux.c b/mux.c
index 26741202..4c0eb424 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mux.c,v 1.90 2021/07/13 23:48:36 djm Exp $ */
+/* $OpenBSD: mux.c,v 1.91 2021/07/23 04:00:59 djm Exp $ */
/*
* Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
*
@@ -71,7 +71,6 @@
/* from ssh.c */
extern int tty_flag;
extern Options options;
-extern int stdin_null_flag;
extern char *host;
extern struct sshbuf *command;
extern volatile sig_atomic_t quit_pending;
@@ -1879,7 +1878,7 @@ mux_client_request_session(int fd)
ssh_signal(SIGPIPE, SIG_IGN);
- if (stdin_null_flag && stdfd_devnull(1, 0, 0) == -1)
+ if (options.stdin_null && stdfd_devnull(1, 0, 0) == -1)
fatal_f("stdfd_devnull failed");
if ((term = lookup_env_in_list("TERM", options.setenv,
@@ -2102,7 +2101,7 @@ mux_client_request_stdio_fwd(int fd)
ssh_signal(SIGPIPE, SIG_IGN);
- if (stdin_null_flag && stdfd_devnull(1, 0, 0) == -1)
+ if (options.stdin_null && stdfd_devnull(1, 0, 0) == -1)
fatal_f("stdfd_devnull failed");
if ((m = sshbuf_new()) == NULL)