]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
- (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and
authorDamien Miller <djm@mindrot.org>
Mon, 10 Mar 2003 00:38:10 +0000 (11:38 +1100)
committerDamien Miller <djm@mindrot.org>
Mon, 10 Mar 2003 00:38:10 +0000 (11:38 +1100)
   dtucker@zip.com.au

ChangeLog
acconfig.h
configure.ac
sshd.c

index d060257e9cb173c5cb44754b2785e2072c9bb85a..37a51edaad7c20e6f5cde3fdd6ccea555e8e7433 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
      fix memory leaks; from dlheine@suif.Stanford.EDU/CLOUSEAU; ok djm@
  - (djm) One more portable-specific one from dlheine@suif.Stanford.EDU/
    CLOUSEAU
+ - (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and 
+   dtucker@zip.com.au
 
 20030225
  - (djm) Fix some compile errors spotted by dtucker and his fabulous 
      save auth method before monitor_reset_key_state(); bugzilla bug #284;
      ok provos@
 
-$Id: ChangeLog,v 1.2624 2003/03/10 00:23:06 djm Exp $
+$Id: ChangeLog,v 1.2625 2003/03/10 00:38:10 djm Exp $
index b289660844ac951c7c1c4253fbb4bf38822abd8b..b6e4b37cc2bd342a5d64efca0ce6f666acbc717e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: acconfig.h,v 1.148 2003/01/28 00:33:44 djm Exp $ */
+/* $Id: acconfig.h,v 1.149 2003/03/10 00:38:10 djm Exp $ */
 
 #ifndef _CONFIG_H
 #define _CONFIG_H
 /* Some systems put this outside of libc */
 #undef HAVE_NANOSLEEP
 
+/* Pushing STREAMS modules incorrectly acquires a controlling TTY */
+#undef STREAMS_PUSH_ACQUIRES_CTTY
+
 @BOTTOM@
 
 /* ******************* Shouldn't need to edit below this line ************** */
index bdf80288e0355efa13060484cd37487f05682949..3469af2f4cce70afe27bf4b9e89999005a6d4714 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.109 2003/02/24 04:45:43 djm Exp $
+# $Id: configure.ac,v 1.110 2003/03/10 00:38:10 djm Exp $
 
 AC_INIT
 AC_CONFIG_SRCDIR([ssh.c])
@@ -216,6 +216,7 @@ mips-sony-bsd|mips-sony-newsos4)
        AC_DEFINE(LOGIN_NEEDS_UTMPX)
        AC_DEFINE(LOGIN_NEEDS_TERM)
        AC_DEFINE(PAM_TTY_KLUDGE)
+       AC_DEFINE(STREAMS_PUSH_ACQUIRES_CTTY)
        # hardwire lastlog location (can't detect it on some versions)
        conf_lastlog_location="/var/adm/lastlog"
        AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
diff --git a/sshd.c b/sshd.c
index 86441cff1da67cbf32d0a5bb3b4adca57c2b4d11..0f2b2a3ce597496363d99d3b2d873be10981bced 100644 (file)
--- a/sshd.c
+++ b/sshd.c
@@ -1400,8 +1400,12 @@ main(int ac, char **av)
         * setlogin() affects the entire process group.  We don't
         * want the child to be able to affect the parent.
         */
-#if 0
-       /* XXX: this breaks Solaris */
+#if !defined(STREAMS_PUSH_ACQUIRES_CTTY)
+       /*
+        * If setsid is called on Solaris, sshd will acquire the controlling
+        * terminal while pushing STREAMS modules. This will prevent the
+        * shell from acquiring it later.
+        */
        if (!debug_flag && !inetd_flag && setsid() < 0)
                error("setsid: %.100s", strerror(errno));
 #endif