[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-security] Raq2 - OpenSSH 3.7.1.p2 compile FIX



Holy patch-fest, Patchman! This has been one wacky week...

For those of you trying to compile the latest OpenSSH for the Raq2/Qube2 platforms, I'm sure you've run into a few problems. With a couple of workarounds for the broken MIPS compiler, I was able to successfully compile and install the latest OpenSSH.

1. Make sure your compiler is upgraded. For instructions see link below:

http://list.cobalt.com/pipermail/cobalt-users/2003-September/095814.html

2. Patch monitor_fdpass.c in the OpenSSH 3.7.1p2 source using the patch below.

--cut below this line--
--- monitor_fdpass.c.orig       Fri May  2 05:48:21 2003
+++ monitor_fdpass.c    Tue Sep 23 14:31:30 2003
@@ -24,6 +24,11 @@
  */

 #include "includes.h"
+
+#ifndef SCM_RIGHTS
+#define SCM_RIGHTS 0x01
+#endif /* SCM_RIGHTS */
+
RCSID("$OpenBSD: monitor_fdpass.c,v 1.4 2002/06/26 14:50:04 deraadt Exp $");

 #include <sys/uio.h>
@@ -113,11 +118,12 @@
                fatal("%s: no fd", __func__);
 #else
        cmsg = CMSG_FIRSTHDR(&msg);
-#ifndef BROKEN_CMSG_TYPE
+#if 0
+        /* Linux kernel 2.0.x doesn't handle cmsg_type in recvmsg(). */
        if (cmsg->cmsg_type != SCM_RIGHTS)
                fatal("%s: expected type %d got %d", __func__,
                    SCM_RIGHTS, cmsg->cmsg_type);
-#endif
+#endif /* 0 */
        fd = (*(int *)CMSG_DATA(cmsg));
 #endif
        return fd;
--end cut--

3. Replace uidswap.c with uidswap.c from version OpenSSH 3.6.1p1 source. If you like to see why you need to do this, see links below:

http://golem.ph.utexas.edu/~distler/blog/archives/000221.html
http://marc.theaimsgroup.com/?l=openssh-unix-dev&m=106377313806726&w=2

4. Now you should be able to run your ./configure, make, make install and get a working 3.7.1p2 binary.

HTH,
j