diff options
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh.c,v 1.406 2014/07/15 15:54:14 millert Exp $ */ | 1 | /* $OpenBSD: ssh.c,v 1.407 2014/07/17 07:22:19 djm 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 |
@@ -1360,6 +1360,13 @@ client_cleanup_stdio_fwd(int id, void *arg) | |||
1360 | } | 1360 | } |
1361 | 1361 | ||
1362 | static void | 1362 | static void |
1363 | ssh_stdio_confirm(int id, int success, void *arg) | ||
1364 | { | ||
1365 | if (!success) | ||
1366 | fatal("stdio forwarding failed"); | ||
1367 | } | ||
1368 | |||
1369 | static void | ||
1363 | ssh_init_stdio_forwarding(void) | 1370 | ssh_init_stdio_forwarding(void) |
1364 | { | 1371 | { |
1365 | Channel *c; | 1372 | Channel *c; |
@@ -1379,6 +1386,7 @@ ssh_init_stdio_forwarding(void) | |||
1379 | stdio_forward_port, in, out)) == NULL) | 1386 | stdio_forward_port, in, out)) == NULL) |
1380 | fatal("%s: channel_connect_stdio_fwd failed", __func__); | 1387 | fatal("%s: channel_connect_stdio_fwd failed", __func__); |
1381 | channel_register_cleanup(c->self, client_cleanup_stdio_fwd, 0); | 1388 | channel_register_cleanup(c->self, client_cleanup_stdio_fwd, 0); |
1389 | channel_register_open_confirm(c->self, ssh_stdio_confirm, NULL); | ||
1382 | } | 1390 | } |
1383 | 1391 | ||
1384 | static void | 1392 | static void |