Date: 8 Sep 1999 09:20:16 -0000 From: operator@technorama.net To: FreeBSD-gnats-submit@freebsd.org Subject: bin/13742: inetd leaks filedescriptors to children +FIX Message-ID: <19990908092016.19572.qmail@technorama.net>
next in thread | raw e-mail | index | archive | help
>Number: 13742 >Category: bin >Synopsis: inetd leaks filedescriptors to children +FIX >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Sep 13 16:50:00 PDT 1999 >Closed-Date: >Last-Modified: >Originator: System & >Release: FreeBSD 3.2-RELEASE i386 >Organization: >Environment: N/A >Description: inetd fails to close signalpipe[0,1] before exec. >How-To-Repeat: use lsof to track pipes of inetd children. >Fix: --- inetd.c.orig Wed Sep 8 04:52:30 1999 +++ inetd.c Wed Sep 8 05:03:59 1999 @@ -464,6 +464,11 @@ syslog(LOG_ERR, "pipe: %%m"); exit(EX_OSERR); } + if (fcntl(signalpipe[0], F_SETFD, 1) || + fcntl(signalpipe[1], F_SETFD, 1)) { + syslog(LOG_ERR, "fcntl: %%m"); + exit(EX_OSERR); + } FD_SET(signalpipe[0], &allsock); nsock++; if (signalpipe[0] > maxsock) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990908092016.19572.qmail>