diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2018-11-18 22:43:30 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2018-11-18 22:43:30 +0000 |
commit | 50b8bcb6525e1417717c89e8f6645ad35e3014cc (patch) | |
tree | b5df2c1d8c436416578ac327a791694f8947eeaf /usr.bin | |
parent | 34446722f7e1dd49ead194745c65f5aa4237958c (diff) |
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@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/sshconnect.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshconnect.c b/usr.bin/ssh/sshconnect.c index 591f1435ecb..ecf81300c07 100644 --- a/usr.bin/ssh/sshconnect.c +++ b/usr.bin/ssh/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 @@ -150,7 +150,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; @@ -232,7 +233,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; |