- (dtucker) [channels.c serverloop.c] Apply the bug #1102 workaround to ptys

only, otherwise sshd can hang exiting non-interactive sessions.
This commit is contained in:
Darren Tucker 2006-06-25 08:25:25 +10:00
Родитель 03890e44cd
Коммит 144e8d60cd
3 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,7 @@
20060625
- (dtucker) [channels.c serverloop.c] Apply the bug #1102 workaround to ptys
only, otherwise sshd can hang exiting non-interactive sessions.
20060624
- (dtucker) [configure.ac] Bug #1193: Define PASSWD_NEEDS_USERNAME on Solaris.
Works around limitation in Solaris' passwd program for changing passwords
@ -4704,4 +4708,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.4348 2006/06/24 06:58:45 dtucker Exp $
$Id: ChangeLog,v 1.4349 2006/06/24 22:25:25 dtucker Exp $

Просмотреть файл

@ -1422,7 +1422,8 @@ channel_handle_rfd(Channel *c, fd_set *readset, fd_set *writeset)
#ifndef PTY_ZEROREAD
if (len <= 0) {
#else
if (len < 0 || (len == 0 && errno != 0)) {
if ((!c->isatty && len <= 0) ||
(c->isatty && (len < 0 || (len == 0 && errno != 0)))) {
#endif
debug2("channel %d: read<=0 rfd %d len %d",
c->self, c->rfd, len);

Просмотреть файл

@ -394,7 +394,8 @@ process_input(fd_set *readset)
#ifndef PTY_ZEROREAD
} else if (len <= 0) {
#else
} else if (len < 0 || (len == 0 && errno != 0)) {
} else if ((!isatty(fdout) && len <= 0) ||
(isatty(fdout) && (len < 0 || (len == 0 && errno != 0)))) {
#endif
fdout_eof = 1;
} else {
@ -411,7 +412,8 @@ process_input(fd_set *readset)
#ifndef PTY_ZEROREAD
} else if (len <= 0) {
#else
} else if (len < 0 || (len == 0 && errno != 0)) {
} else if ((!isatty(fderr) && len <= 0) ||
(isatty(fderr) && (len < 0 || (len == 0 && errno != 0)))) {
#endif
fderr_eof = 1;
} else {