View | Details | Raw Unified | Return to bug 536 | Differences between
and this patch

Collapse All | Expand All

(-)acconfig.h (-2 / +2 lines)
Lines 374-381 Link Here
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 */
377
/* Define if sshd somehow reacquires a controlling TTY after setsid() */
378
#undef STREAMS_PUSH_ACQUIRES_CTTY
378
#undef SSHD_ACQUIRES_CTTY
379
379
380
/* Define if cmsg_type is not passed correctly */
380
/* Define if cmsg_type is not passed correctly */
381
#undef BROKEN_CMSG_TYPE
381
#undef BROKEN_CMSG_TYPE
(-)configure.ac (-5 / +4 lines)
Lines 188-201 Link Here
188
	AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
188
	AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
189
	AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
189
	AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
190
	inet6_default_4in6=yes
190
	inet6_default_4in6=yes
191
	AC_MSG_CHECKING(for broken cmsg_type)
192
	case `uname -r` in
191
	case `uname -r` in
193
	2.0.*)
192
	2.0.*)
194
		AC_MSG_RESULT(yes)
195
		AC_DEFINE(BROKEN_CMSG_TYPE)
193
		AC_DEFINE(BROKEN_CMSG_TYPE)
194
		AC_DEFINE(SSHD_ACQUIRES_CTTY)
196
		;;
195
		;;
197
	*)
196
	2.2.*)
198
		AC_MSG_RESULT(no)
197
		AC_DEFINE(SSHD_ACQUIRES_CTTY)
199
		;;
198
		;;
200
	esac
199
	esac
201
	;;
200
	;;
Lines 230-236 Link Here
230
	AC_DEFINE(LOGIN_NEEDS_UTMPX)
229
	AC_DEFINE(LOGIN_NEEDS_UTMPX)
231
	AC_DEFINE(LOGIN_NEEDS_TERM)
230
	AC_DEFINE(LOGIN_NEEDS_TERM)
232
	AC_DEFINE(PAM_TTY_KLUDGE)
231
	AC_DEFINE(PAM_TTY_KLUDGE)
233
	AC_DEFINE(STREAMS_PUSH_ACQUIRES_CTTY)
232
	AC_DEFINE(SSHD_ACQUIRES_CTTY)
234
	# hardwire lastlog location (can't detect it on some versions)
233
	# hardwire lastlog location (can't detect it on some versions)
235
	conf_lastlog_location="/var/adm/lastlog"
234
	conf_lastlog_location="/var/adm/lastlog"
236
	AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
235
	AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x)
(-)sshd.c (-4 / +4 lines)
Lines 1400-1410 Link Here
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 !defined(STREAMS_PUSH_ACQUIRES_CTTY)
1403
#if !defined(SSHD_ACQUIRES_CTTY)
1404
	/*
1404
	/*
1405
	 * If setsid is called on Solaris, sshd will acquire the controlling
1405
	 * If setsid is called on some platforms, sshd will later acquire a
1406
	 * terminal while pushing STREAMS modules. This will prevent the
1406
	 * controlling terminal, which will cause "could not set controlling
1407
	 * shell from acquiring it later.
1407
	 * tty" errors. On Solaris, this happens while pushing STREAMS modules.
1408
	 */
1408
	 */
1409
	if (!debug_flag && !inetd_flag && setsid() < 0)
1409
	if (!debug_flag && !inetd_flag && setsid() < 0)
1410
		error("setsid: %.100s", strerror(errno));
1410
		error("setsid: %.100s", strerror(errno));

Return to bug 536