summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-03-10 11:38:10 +1100
committerDamien Miller <djm@mindrot.org>2003-03-10 11:38:10 +1100
commit933cc8fb9cd3e34b9b656f73ad8b661c08551875 (patch)
tree9cb59bcb334172ec58addeffcb5a87b97e7f2023
parentf211efc69071744ad22e0b8a1c7ca01bdff0b91b (diff)
- (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and
dtucker@zip.com.au
-rw-r--r--ChangeLog4
-rw-r--r--acconfig.h5
-rw-r--r--configure.ac3
-rw-r--r--sshd.c8
4 files changed, 15 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index d060257e9..37a51edaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
6 fix memory leaks; from dlheine@suif.Stanford.EDU/CLOUSEAU; ok djm@ 6 fix memory leaks; from dlheine@suif.Stanford.EDU/CLOUSEAU; ok djm@
7 - (djm) One more portable-specific one from dlheine@suif.Stanford.EDU/ 7 - (djm) One more portable-specific one from dlheine@suif.Stanford.EDU/
8 CLOUSEAU 8 CLOUSEAU
9 - (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and
10 dtucker@zip.com.au
9 11
1020030225 1220030225
11 - (djm) Fix some compile errors spotted by dtucker and his fabulous 13 - (djm) Fix some compile errors spotted by dtucker and his fabulous
@@ -1200,4 +1202,4 @@
1200 save auth method before monitor_reset_key_state(); bugzilla bug #284; 1202 save auth method before monitor_reset_key_state(); bugzilla bug #284;
1201 ok provos@ 1203 ok provos@
1202 1204
1203$Id: ChangeLog,v 1.2624 2003/03/10 00:23:06 djm Exp $ 1205$Id: ChangeLog,v 1.2625 2003/03/10 00:38:10 djm Exp $
diff --git a/acconfig.h b/acconfig.h
index b28966084..b6e4b37cc 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,4 +1,4 @@
1/* $Id: acconfig.h,v 1.148 2003/01/28 00:33:44 djm Exp $ */ 1/* $Id: acconfig.h,v 1.149 2003/03/10 00:38:10 djm Exp $ */
2 2
3#ifndef _CONFIG_H 3#ifndef _CONFIG_H
4#define _CONFIG_H 4#define _CONFIG_H
@@ -374,6 +374,9 @@
374/* Some systems put this outside of libc */ 374/* Some systems put this outside of libc */
375#undef HAVE_NANOSLEEP 375#undef HAVE_NANOSLEEP
376 376
377/* Pushing STREAMS modules incorrectly acquires a controlling TTY */
378#undef STREAMS_PUSH_ACQUIRES_CTTY
379
377@BOTTOM@ 380@BOTTOM@
378 381
379/* ******************* Shouldn't need to edit below this line ************** */ 382/* ******************* Shouldn't need to edit below this line ************** */
diff --git a/configure.ac b/configure.ac
index bdf80288e..3469af2f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.109 2003/02/24 04:45:43 djm Exp $ 1# $Id: configure.ac,v 1.110 2003/03/10 00:38:10 djm Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -216,6 +216,7 @@ mips-sony-bsd|mips-sony-newsos4)
216 AC_DEFINE(LOGIN_NEEDS_UTMPX) 216 AC_DEFINE(LOGIN_NEEDS_UTMPX)
217 AC_DEFINE(LOGIN_NEEDS_TERM) 217 AC_DEFINE(LOGIN_NEEDS_TERM)
218 AC_DEFINE(PAM_TTY_KLUDGE) 218 AC_DEFINE(PAM_TTY_KLUDGE)
219 AC_DEFINE(STREAMS_PUSH_ACQUIRES_CTTY)
219 # hardwire lastlog location (can't detect it on some versions) 220 # hardwire lastlog location (can't detect it on some versions)
220 conf_lastlog_location="/var/adm/lastlog" 221 conf_lastlog_location="/var/adm/lastlog"
221 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) 222 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
diff --git a/sshd.c b/sshd.c
index 86441cff1..0f2b2a3ce 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1400,8 +1400,12 @@ main(int ac, char **av)
1400 * setlogin() affects the entire process group. We don't 1400 * setlogin() affects the entire process group. We don't
1401 * want the child to be able to affect the parent. 1401 * want the child to be able to affect the parent.
1402 */ 1402 */
1403#if 0 1403#if !defined(STREAMS_PUSH_ACQUIRES_CTTY)
1404 /* XXX: this breaks Solaris */ 1404 /*
1405 * If setsid is called on Solaris, sshd will acquire the controlling
1406 * terminal while pushing STREAMS modules. This will prevent the
1407 * shell from acquiring it later.
1408 */
1405 if (!debug_flag && !inetd_flag && setsid() < 0) 1409 if (!debug_flag && !inetd_flag && setsid() < 0)
1406 error("setsid: %.100s", strerror(errno)); 1410 error("setsid: %.100s", strerror(errno));
1407#endif 1411#endif