]> andersk Git - openssh.git/blobdiff - serverloop.c
- (dtucker) [auth-pam.c] Propogate TZ environment variable to PAM auth
[openssh.git] / serverloop.c
index e370f63a3ada40394a870ce9c8e8a6ef2f8f33c7..6e5fdc2d8c89edce6f4ec40b5381adfcfba8cd20 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: serverloop.c,v 1.135 2006/03/25 18:30:55 deraadt Exp $ */
+/* $OpenBSD: serverloop.c,v 1.144 2006/08/03 03:34:42 deraadt Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
 #include "includes.h"
 
 #include <sys/types.h>
+#include <sys/param.h>
 #include <sys/wait.h>
+#include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+
+#include <netinet/in.h>
 
+#include <errno.h>
+#include <fcntl.h>
+#include <pwd.h>
 #include <signal.h>
+#include <string.h>
 #include <termios.h>
+#include <unistd.h>
+#include <stdarg.h>
 
 #include "xmalloc.h"
 #include "packet.h"
 #include "compat.h"
 #include "ssh1.h"
 #include "ssh2.h"
+#include "key.h"
+#include "cipher.h"
+#include "kex.h"
+#include "hostfile.h"
 #include "auth.h"
 #include "session.h"
 #include "dispatch.h"
 #include "auth-options.h"
 #include "serverloop.h"
 #include "misc.h"
-#include "kex.h"
 
 extern ServerOptions options;
 
@@ -394,7 +410,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 +428,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 {
This page took 0.053305 seconds and 4 git commands to generate.