diff options
author | djm <djm> | 2007-09-17 02:04:08 +0000 |
---|---|---|
committer | djm <djm> | 2007-09-17 02:04:08 +0000 |
commit | 621a02c40d5c1fd6a122d4b1779e67b18dd2f040 (patch) | |
tree | 1f084b62abf72629b7a3e63daf52098b761e7780 /monitor_wrap.c | |
parent | 42b4032276bb3f858f6b48cbe3ac207698dd1e85 (diff) | |
download | openssh-621a02c40d5c1fd6a122d4b1779e67b18dd2f040.tar.gz |
- 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 'monitor_wrap.c')
-rw-r--r-- | monitor_wrap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c index edf2814e..36154be4 100644 --- a/monitor_wrap.c +++ b/monitor_wrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_wrap.c,v 1.57 2007/06/07 19:37:34 pvalchev Exp $ */ +/* $OpenBSD: monitor_wrap.c,v 1.58 2007/09/04 03:21:03 djm Exp $ */ /* * Copyright 2002 Niels Provos <provos@citi.umich.edu> * Copyright 2002 Markus Friedl <markus@openbsd.org> @@ -688,8 +688,9 @@ mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) buffer_append(&loginmsg, msg, strlen(msg)); xfree(msg); - *ptyfd = mm_receive_fd(pmonitor->m_recvfd); - *ttyfd = mm_receive_fd(pmonitor->m_recvfd); + if ((*ptyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1 || + (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) + fatal("%s: receive fds failed", __func__); /* Success */ return (1); |