OpenSSH on NCR MPRAS

Darren Tucker dtucker at zip.com.au
Wed Nov 16 23:59:14 EST 2005


On Wed, Nov 16, 2005 at 11:49:43PM +1100, Darren Tucker wrote:
> The following patch ought to do it (against 4.2p1).  You will need
> to either rebuild configure with autoconf or add "-DBROKEN_ACCEPT"
> to your CFLAGS.

And now a patch that has a chance of working....

Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
retrieving revision 1.292
diff -u -p -r1.292 configure.ac
--- configure.ac	31 Aug 2005 16:59:49 -0000	1.292
+++ configure.ac	16 Nov 2005 12:44:59 -0000
@@ -418,6 +418,7 @@ mips-sony-bsd|mips-sony-newsos4)
 	AC_DEFINE(SETEUID_BREAKS_SETUID)
 	AC_DEFINE(BROKEN_SETREUID)
 	AC_DEFINE(BROKEN_SETREGID)
+	AC_DEFINE(BROKEN_ACCEPT, 1, [broken accept])
 	;;
 *-sni-sysv*)
 	# /usr/ucblib MUST NOT be searched on ReliantUNIX
Index: sshd.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/sshd.c,v
retrieving revision 1.313
diff -u -p -r1.313 sshd.c
--- sshd.c	26 Jul 2005 11:54:56 -0000	1.313
+++ sshd.c	16 Nov 2005 12:57:14 -0000
@@ -1429,6 +1429,14 @@ main(int ac, char **av)
 				fromlen = sizeof(from);
 				newsock = accept(listen_socks[i], (struct sockaddr *)&from,
 				    &fromlen);
+#ifdef BROKEN_ACCEPT
+				if (errno == ENXIO) {
+					static int enxio_count = 0;
+
+					if (enxio_count++ > 10000)
+						received_sighup = 1;
+				}
+#endif
 				if (newsock < 0) {
 					if (errno != EINTR && errno != EWOULDBLOCK)
 						error("accept: %.100s", strerror(errno));

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.




More information about the openssh-unix-dev mailing list