summaryrefslogtreecommitdiffstats
path: root/sshd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-03-10 01:38:10 +0100
committerDamien Miller <djm@mindrot.org>2003-03-10 01:38:10 +0100
commit933cc8fb9cd3e34b9b656f73ad8b661c08551875 (patch)
tree9cb59bcb334172ec58addeffcb5a87b97e7f2023 /sshd.c
parent - (djm) One more portable-specific one from dlheine@suif.Stanford.EDU/ (diff)
downloadopenssh-933cc8fb9cd3e34b9b656f73ad8b661c08551875.tar.xz
openssh-933cc8fb9cd3e34b9b656f73ad8b661c08551875.zip
- (djm) Bug #245: TTY problems on Solaris. Fix by stevesk@ and
dtucker@zip.com.au
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c8
1 files changed, 6 insertions, 2 deletions
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)
* 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