From 8eff319298d980ed50b9ec681a2f97d3ed5fb6d1 Mon Sep 17 00:00:00 2001 From: Tim Rice Date: Tue, 25 Jun 2002 15:35:15 -0700 Subject: [acconfig.h configure.ac sshd.c] BROKEN_FD_PASSING fix from Markus for Cygwin, Cray, & SCO --- ChangeLog | 4 +++- acconfig.h | 5 ++++- configure.ac | 5 ++++- sshd.c | 4 ++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 15cf17b86..9c23246bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ - (tim) [contrib/caldera/openssh.spec] Sync with Caldera - (bal) moved aix_usrinfo() and noted not setting real TTY. Patch by dtucker@zip.com.au + - (tim) [acconfig.h configure.ac sshd.c] BROKEN_FD_PASSING fix from Markus + for Cygwin, Cray, & SCO 20020624 - OpenBSD CVS Sync @@ -1094,4 +1096,4 @@ - (stevesk) entropy.c: typo in debug message - (djm) ssh-keygen -i needs seeded RNG; report from markus@ -$Id: ChangeLog,v 1.2271 2002/06/25 17:12:26 mouring Exp $ +$Id: ChangeLog,v 1.2272 2002/06/25 22:35:15 tim Exp $ diff --git a/acconfig.h b/acconfig.h index 0bf305bb8..3e51d6112 100644 --- a/acconfig.h +++ b/acconfig.h @@ -1,4 +1,4 @@ -/* $Id: acconfig.h,v 1.140 2002/06/25 03:22:04 mouring Exp $ */ +/* $Id: acconfig.h,v 1.141 2002/06/25 22:35:16 tim Exp $ */ #ifndef _CONFIG_H #define _CONFIG_H @@ -358,6 +358,9 @@ /* Define if you have the `mmap' function that supports MAP_ANON|SHARED */ #undef HAVE_MMAP_ANON_SHARED +/* Define if sendmsg()/recvmsg() has problems passing file descriptors */ +#undef BROKEN_FD_PASSING + @BOTTOM@ /* ******************* Shouldn't need to edit below this line ************** */ diff --git a/configure.ac b/configure.ac index a99860334..ad5d5cde9 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac,v 1.71 2002/06/25 03:22:04 mouring Exp $ +# $Id: configure.ac,v 1.72 2002/06/25 22:35:16 tim Exp $ AC_INIT AC_CONFIG_SRCDIR([ssh.c]) @@ -86,6 +86,7 @@ case "$host" in AC_DEFINE(IPV4_DEFAULT) AC_DEFINE(IP_TOS_IS_BROKEN) AC_DEFINE(NO_X11_UNIX_SOCKETS) + AC_DEFINE(BROKEN_FD_PASSING) AC_DEFINE(SETGROUPS_NOOP) ;; *-*-dgux*) @@ -266,6 +267,7 @@ mips-sony-bsd|mips-sony-newsos4) AC_DEFINE(USE_PIPES) AC_DEFINE(HAVE_SECUREWARE) AC_DEFINE(DISABLE_SHADOW) + AC_DEFINE(BROKEN_FD_PASSING) AC_CHECK_FUNCS(getluid setluid) MANTYPE=man ;; @@ -273,6 +275,7 @@ mips-sony-bsd|mips-sony-newsos4) no_libsocket=1 no_libnsl=1 AC_DEFINE(USE_PIPES) + AC_DEFINE(BROKEN_FD_PASSING) LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal,-L/usr/local/lib" LIBS="$LIBS -lgen -lrsc" ;; diff --git a/sshd.c b/sshd.c index 025f71101..18df8ab8f 100644 --- a/sshd.c +++ b/sshd.c @@ -613,7 +613,11 @@ privsep_postauth(Authctxt *authctxt) /* XXX - Remote port forwarding */ x_authctxt = authctxt; +#ifdef BROKEN_FD_PASSING + if (1) { +#else if (authctxt->pw->pw_uid == 0 || options.use_login) { +#endif /* File descriptor passing is broken or root login */ monitor_apply_keystate(pmonitor); use_privsep = 0; -- cgit v1.2.3