summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2018-11-18 22:43:29 +0000
committerDamien Miller <djm@mindrot.org>2018-11-19 15:13:38 +1100
commit7fca94edbe8ca9f879da9fdd2afd959c4180f4c7 (patch)
treea0db953ebe2835ad7fd7701577630af4acf0864c /sshconnect.c
parentccef7c4faf914993b53035cd2b25ce02ab039c9d (diff)
upstream: Fix inverted logic for redirecting ProxyCommand stderr to
/dev/null. Fixes mosh in proxycommand mode that was broken by the previous ProxyCommand change that was reported by matthieu@. ok djm@ danj@ OpenBSD-Commit-ID: c6fc9641bc250221a0a81c6beb2e72d603f8add6
Diffstat (limited to 'sshconnect.c')
-rw-r--r--sshconnect.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sshconnect.c b/sshconnect.c
index a700f467f..4862da5ed 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.307 2018/11/16 06:17:38 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.308 2018/11/18 22:43:29 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -163,7 +163,8 @@ ssh_proxy_fdpass_connect(struct ssh *ssh, const char *host, u_short port,
163 * Stderr is left for non-ControlPersist connections is so 163 * Stderr is left for non-ControlPersist connections is so
164 * error messages may be printed on the user's terminal. 164 * error messages may be printed on the user's terminal.
165 */ 165 */
166 if (debug_flag || !options.control_persist) 166 if (!debug_flag && options.control_path != NULL &&
167 options.control_persist)
167 stderr_null(); 168 stderr_null();
168 169
169 argv[0] = shell; 170 argv[0] = shell;
@@ -245,7 +246,8 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port,
245 * Stderr is left for non-ControlPersist connections is so 246 * Stderr is left for non-ControlPersist connections is so
246 * error messages may be printed on the user's terminal. 247 * error messages may be printed on the user's terminal.
247 */ 248 */
248 if (debug_flag || !options.control_persist) 249 if (!debug_flag && options.control_path != NULL &&
250 options.control_persist)
249 stderr_null(); 251 stderr_null();
250 252
251 argv[0] = shell; 253 argv[0] = shell;