summaryrefslogtreecommitdiff
path: root/sshd.c
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 /sshd.c
parentf211efc69071744ad22e0b8a1c7ca01bdff0b91b (diff)
- (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 86441cff..0f2b2a3c 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