- (dtucker) Bug #544: ignore invalid cmsg_type on Linux 2.0 kernels,

privsep should now work.
This commit is contained in:
Darren Tucker 2003-05-02 20:48:21 +10:00
parent eab4bae038
commit 3c01654deb
4 changed files with 22 additions and 3 deletions

View File

@ -1,3 +1,7 @@
20030502
- (dtucker) Bug #544: ignore invalid cmsg_type on Linux 2.0 kernels,
privsep should now work.
20030429
- (djm) Add back radix.o (used by AFS support), after it went missing from
Makefile many moons ago
@ -1356,4 +1360,4 @@
save auth method before monitor_reset_key_state(); bugzilla bug #284;
ok provos@
$Id: ChangeLog,v 1.2664 2003/04/29 13:22:40 djm Exp $
$Id: ChangeLog,v 1.2665 2003/05/02 10:48:21 dtucker Exp $

View File

@ -1,4 +1,4 @@
/* $Id: acconfig.h,v 1.149 2003/03/10 00:38:10 djm Exp $ */
/* $Id: acconfig.h,v 1.150 2003/05/02 10:48:21 dtucker Exp $ */
#ifndef _CONFIG_H
#define _CONFIG_H
@ -377,6 +377,9 @@
/* Pushing STREAMS modules incorrectly acquires a controlling TTY */
#undef STREAMS_PUSH_ACQUIRES_CTTY
/* Define if cmsg_type is not passed correctly */
#undef BROKEN_CMSG_TYPE
@BOTTOM@
/* ******************* Shouldn't need to edit below this line ************** */

View File

@ -1,4 +1,4 @@
# $Id: configure.ac,v 1.114 2003/04/29 13:22:40 djm Exp $
# $Id: configure.ac,v 1.115 2003/05/02 10:48:21 dtucker Exp $
AC_INIT
AC_CONFIG_SRCDIR([ssh.c])
@ -188,6 +188,16 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
AC_DEFINE(SETPROCTITLE_STRATEGY,PS_USE_CLOBBER_ARGV)
AC_DEFINE(SETPROCTITLE_PS_PADDING, '\0')
inet6_default_4in6=yes
AC_MSG_CHECKING(for broken cmsg_type)
case `uname -r` in
2.0.*)
AC_MSG_RESULT(yes)
AC_DEFINE(BROKEN_CMSG_TYPE)
;;
*)
AC_MSG_RESULT(no)
;;
esac
;;
mips-sony-bsd|mips-sony-newsos4)
AC_DEFINE(HAVE_NEWS4)

View File

@ -113,9 +113,11 @@ mm_receive_fd(int socket)
fatal("%s: no fd", __func__);
#else
cmsg = CMSG_FIRSTHDR(&msg);
#ifndef BROKEN_CMSG_TYPE
if (cmsg->cmsg_type != SCM_RIGHTS)
fatal("%s: expected type %d got %d", __func__,
SCM_RIGHTS, cmsg->cmsg_type);
#endif
fd = (*(int *)CMSG_DATA(cmsg));
#endif
return fd;