From owner-freebsd-security Thu Aug 28 04:19:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id EAA22518 for security-outgoing; Thu, 28 Aug 1997 04:19:24 -0700 (PDT) Received: from burgundy.eecs.harvard.edu (dholland@burgundy.eecs.harvard.edu [140.247.60.165]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id EAA22513 for ; Thu, 28 Aug 1997 04:19:18 -0700 (PDT) Received: (from dholland@localhost) by burgundy.eecs.harvard.edu (8.8.5/8.8.5) id HAA12959 for freebsd-security@freebsd.org; Thu, 28 Aug 1997 07:19:15 -0400 (EDT) From: David Holland Message-Id: <199708281119.HAA12959@burgundy.eecs.harvard.edu> Subject: sleeps in inetd... To: freebsd-security@freebsd.org Date: Thu, 28 Aug 1997 07:19:15 -0400 (EDT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-security@freebsd.org X-Loop: FreeBSD.org Precedence: bulk It appears that guy was right about one thing. This bug affects Linux, OpenBSD, and NetBSD as well as FreeBSD, all in -current. Several people have looked right through this recently, including me. :( The KNF style guide should really be revised to prohibit, instead of require, constructions of the form if (a) b(); Sigh. --- inetd.c.old Thu Aug 28 07:06:31 1997 +++ inetd.c Thu Aug 28 07:10:34 1997 @@ -386,11 +386,12 @@ } readable = allsock; if ((n = select(maxsock + 1, &readable, (fd_set *)0, (fd_set *)0, (struct timeval *)0)) <= 0) { - if (n < 0 && errno != EINTR) + if (n < 0 && errno != EINTR) { syslog(LOG_WARNING, "select: %m"); - sleep(1); + sleep(1); + } continue; } for (sep = servtab; n && sep; sep = sep->se_next) if (sep->se_fd != -1 && FD_ISSET(sep->se_fd, &readable)) { -- - David A. Holland | VINO project home page: dholland@eecs.harvard.edu | http://www.eecs.harvard.edu/vino