diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2018-11-18 22:43:29 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-11-19 15:13:38 +1100 |
commit | 7fca94edbe8ca9f879da9fdd2afd959c4180f4c7 (patch) | |
tree | a0db953ebe2835ad7fd7701577630af4acf0864c /sshconnect.c | |
parent | ccef7c4faf914993b53035cd2b25ce02ab039c9d (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.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sshconnect.c b/sshconnect.c index a700f467..4862da5e 100644 --- a/sshconnect.c +++ b/sshconnect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.307 2018/11/16 06:17:38 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.308 2018/11/18 22:43:29 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * 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, * Stderr is left for non-ControlPersist connections is so * error messages may be printed on the user's terminal. */ - if (debug_flag || !options.control_persist) + if (!debug_flag && options.control_path != NULL && + options.control_persist) stderr_null(); argv[0] = shell; @@ -245,7 +246,8 @@ ssh_proxy_connect(struct ssh *ssh, const char *host, u_short port, * Stderr is left for non-ControlPersist connections is so * error messages may be printed on the user's terminal. */ - if (debug_flag || !options.control_persist) + if (!debug_flag && options.control_path != NULL && + options.control_persist) stderr_null(); argv[0] = shell; |