summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-05-02 20:48:21 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-05-02 20:48:21 +1000
commit3c01654deb235191d798a5254561624872a7f010 (patch)
tree71ae1572d4f5440888b9f3ddc1c7ef7512dc7ab6
parenteab4bae03894f07ea556db4d781795c724245af7 (diff)
- (dtucker) Bug #544: ignore invalid cmsg_type on Linux 2.0 kernels,
privsep should now work.
-rw-r--r--ChangeLog6
-rw-r--r--acconfig.h5
-rw-r--r--configure.ac12
-rw-r--r--monitor_fdpass.c2
4 files changed, 22 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d532409db..a3bf76549 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
120030502
2 - (dtucker) Bug #544: ignore invalid cmsg_type on Linux 2.0 kernels,
3 privsep should now work.
4
120030429 520030429
2 - (djm) Add back radix.o (used by AFS support), after it went missing from 6 - (djm) Add back radix.o (used by AFS support), after it went missing from
3 Makefile many moons ago 7 Makefile many moons ago
@@ -1356,4 +1360,4 @@
1356 save auth method before monitor_reset_key_state(); bugzilla bug #284; 1360 save auth method before monitor_reset_key_state(); bugzilla bug #284;
1357 ok provos@ 1361 ok provos@
1358 1362
1359$Id: ChangeLog,v 1.2664 2003/04/29 13:22:40 djm Exp $ 1363$Id: ChangeLog,v 1.2665 2003/05/02 10:48:21 dtucker Exp $
diff --git a/acconfig.h b/acconfig.h
index b6e4b37cc..6164ecc8d 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -1,4 +1,4 @@
1/* $Id: acconfig.h,v 1.149 2003/03/10 00:38:10 djm Exp $ */ 1/* $Id: acconfig.h,v 1.150 2003/05/02 10:48:21 dtucker Exp $ */
2 2
3#ifndef _CONFIG_H 3#ifndef _CONFIG_H
4#define _CONFIG_H 4#define _CONFIG_H
@@ -377,6 +377,9 @@
377/* Pushing STREAMS modules incorrectly acquires a controlling TTY */ 377/* Pushing STREAMS modules incorrectly acquires a controlling TTY */
378#undef STREAMS_PUSH_ACQUIRES_CTTY 378#undef STREAMS_PUSH_ACQUIRES_CTTY
379 379
380/* Define if cmsg_type is not passed correctly */
381#undef BROKEN_CMSG_TYPE
382
380@BOTTOM@ 383@BOTTOM@
381 384
382/* ******************* Shouldn't need to edit below this line ************** */ 385/* ******************* Shouldn't need to edit below this line ************** */
diff --git a/configure.ac b/configure.ac
index 38cc4d401..d6726eaab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.114 2003/04/29 13:22:40 djm Exp $ 1# $Id: configure.ac,v 1.115 2003/05/02 10:48:21 dtucker Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -188,6 +188,16 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
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
193 2.0.*)
194 AC_MSG_RESULT(yes)
195 AC_DEFINE(BROKEN_CMSG_TYPE)
196 ;;
197 *)
198 AC_MSG_RESULT(no)
199 ;;
200 esac
191 ;; 201 ;;
192mips-sony-bsd|mips-sony-newsos4) 202mips-sony-bsd|mips-sony-newsos4)
193 AC_DEFINE(HAVE_NEWS4) 203 AC_DEFINE(HAVE_NEWS4)
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
index 641ce721e..22b7882bd 100644
--- a/monitor_fdpass.c
+++ b/monitor_fdpass.c
@@ -113,9 +113,11 @@ mm_receive_fd(int socket)
113 fatal("%s: no fd", __func__); 113 fatal("%s: no fd", __func__);
114#else 114#else
115 cmsg = CMSG_FIRSTHDR(&msg); 115 cmsg = CMSG_FIRSTHDR(&msg);
116#ifndef BROKEN_CMSG_TYPE
116 if (cmsg->cmsg_type != SCM_RIGHTS) 117 if (cmsg->cmsg_type != SCM_RIGHTS)
117 fatal("%s: expected type %d got %d", __func__, 118 fatal("%s: expected type %d got %d", __func__,
118 SCM_RIGHTS, cmsg->cmsg_type); 119 SCM_RIGHTS, cmsg->cmsg_type);
120#endif
119 fd = (*(int *)CMSG_DATA(cmsg)); 121 fd = (*(int *)CMSG_DATA(cmsg));
120#endif 122#endif
121 return fd; 123 return fd;