summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-09-17 12:04:08 +1000
committerDamien Miller <djm@mindrot.org>2007-09-17 12:04:08 +1000
commit54fd7cf2db5327f304825e0f9aaf9af5a490a75f (patch)
tree37d1a37a4ff6a5a7b6e774937ba3703edca7bc1a /ssh.c
parent1d824ab2e72daf8563f6dc72f4b3638da3b91dce (diff)
- djm@cvs.openbsd.org 2007/09/04 03:21:03
[clientloop.c monitor.c monitor_fdpass.c monitor_fdpass.h] [monitor_wrap.c ssh.c] make file descriptor passing code return an error rather than call fatal() when it encounters problems, and use this to make session multiplexing masters survive slaves failing to pass all stdio FDs; ok markus@
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ssh.c b/ssh.c
index d3a7ffc9b..7f8ea0d17 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.301 2007/08/07 07:32:53 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.302 2007/09/04 03:21:03 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
@@ -1426,9 +1426,10 @@ control_client(const char *path)
1426 if (ssh_msg_send(sock, SSHMUX_VER, &m) == -1) 1426 if (ssh_msg_send(sock, SSHMUX_VER, &m) == -1)
1427 fatal("%s: msg_send", __func__); 1427 fatal("%s: msg_send", __func__);
1428 1428
1429 mm_send_fd(sock, STDIN_FILENO); 1429 if (mm_send_fd(sock, STDIN_FILENO) == -1 ||
1430 mm_send_fd(sock, STDOUT_FILENO); 1430 mm_send_fd(sock, STDOUT_FILENO) == -1 ||
1431 mm_send_fd(sock, STDERR_FILENO); 1431 mm_send_fd(sock, STDERR_FILENO) == -1)
1432 fatal("%s: send fds failed", __func__);
1432 1433
1433 /* Wait for reply, so master has a chance to gather ttymodes */ 1434 /* Wait for reply, so master has a chance to gather ttymodes */
1434 buffer_clear(&m); 1435 buffer_clear(&m);