summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2002-06-25 15:35:15 -0700
committerTim Rice <tim@multitalents.net>2002-06-25 15:35:15 -0700
commit8eff319298d980ed50b9ec681a2f97d3ed5fb6d1 (patch)
treefe6525e62df885ff75a1640441072cc260200742
parentb129be657c17c2a861f6c9e2c1f2d9fdf2770615 (diff)
[acconfig.h configure.ac sshd.c] BROKEN_FD_PASSING fix from Markus
for Cygwin, Cray, & SCO
-rw-r--r--ChangeLog4
-rw-r--r--acconfig.h5
-rw-r--r--configure.ac5
-rw-r--r--sshd.c4
4 files changed, 15 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 15cf17b8..9c23246b 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 0bf305bb..3e51d611 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 a9986033..ad5d5cde 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 025f7110..18df8ab8 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;