diff options
author | 2014-07-17 07:22:19 +0000 | |
---|---|---|
committer | 2014-07-17 07:22:19 +0000 | |
commit | 05f8d412f38a85914977f6bc879d8b0ce38d6ff9 (patch) | |
tree | a39b60e245180fa285108e854d2b7bc818f90b5f /usr.bin/ssh/ssh.c | |
parent | Free sktmp when it's no longer needed. By doing so, we fix a bunch of memory leaks. (diff) | |
download | wireguard-openbsd-05f8d412f38a85914977f6bc879d8b0ce38d6ff9.tar.xz wireguard-openbsd-05f8d412f38a85914977f6bc879d8b0ce38d6ff9.zip |
reflect stdio-forward ("ssh -W host:port ...") failures in exit status.
previously we were always returning 0. bz#2255 reported by Brendan
Germain; ok dtucker
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r-- | usr.bin/ssh/ssh.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c index 7d71665bf62..d83b023c232 100644 --- a/usr.bin/ssh/ssh.c +++ b/usr.bin/ssh/ssh.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.406 2014/07/15 15:54:14 millert Exp $ */ +/* $OpenBSD: ssh.c,v 1.407 2014/07/17 07:22:19 djm Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -1311,6 +1311,13 @@ client_cleanup_stdio_fwd(int id, void *arg) } static void +ssh_stdio_confirm(int id, int success, void *arg) +{ + if (!success) + fatal("stdio forwarding failed"); +} + +static void ssh_init_stdio_forwarding(void) { Channel *c; @@ -1330,6 +1337,7 @@ ssh_init_stdio_forwarding(void) stdio_forward_port, in, out)) == NULL) fatal("%s: channel_connect_stdio_fwd failed", __func__); channel_register_cleanup(c->self, client_cleanup_stdio_fwd, 0); + channel_register_open_confirm(c->self, ssh_stdio_confirm, NULL); } static void |