From owner-freebsd-bugs Wed Jul 21 2:31:27 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 09BD71547A for ; Wed, 21 Jul 1999 02:31:25 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA41875; Wed, 21 Jul 1999 02:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from axl.noc.iafrica.com (axl.noc.iafrica.com [196.31.1.175]) by hub.freebsd.org (Postfix) with ESMTP id 371C015477 for ; Wed, 21 Jul 1999 02:21:51 -0700 (PDT) (envelope-from sheldonh@axl.noc.iafrica.com) Received: from sheldonh (helo=axl.noc.iafrica.com) by axl.noc.iafrica.com with local-esmtp (Exim 3.02 #1) id 116sYx-0004iH-00 for FreeBSD-gnats-submit@freebsd.org; Wed, 21 Jul 1999 11:21:19 +0200 Message-Id: <18120.932548879@axl.noc.iafrica.com> Date: Wed, 21 Jul 1999 11:21:19 +0200 From: Sheldon Hearn Reply-To: Sheldon Hearn To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/12731: inetd SIGHUP breaks SIGCHLD handling Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 12731 >Category: bin >Synopsis: inetd SIGHUP breaks SIGCHLD handling >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: Wed Jul 21 02:30:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Sheldon Hearn >Release: FreeBSD 4.0-CURRENT i386 >Organization: UUNET South Africa >Environment: FreeBSD 4.0-CURRENT w/ rev 1.59 of inetd.c >Description: When a wrapping inetd adds a new service during a SIGHUP-induced config(), and when the rule pertaining to that service in /etc/hosts.allow uses the hosts_options(3) spawn option, inetd is unable to run the associated daemon for that service. >How-To-Repeat: In /etc/inetd.conf: # telnet service commented out: #telnet stream tcp nowait root /usr/libexec/telnetd telnet In /etc/hosts.allow: telnetd: ALL : \ spawn (/bin/echo "Something or other") & \ : ALLOW Make sure no inetd daemon is running and do: # inetd -w # telnet localhost Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused Now, change /etc/inetd.conf: # bind to telnet port: telnet stream tcp nowait root /usr/libexec/telnetd telnet Do: # kill -HUP `cat /var/run/inetd.pid` # telnet localhost Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. Connection closed by foreign host. Notice in /var/log/messages: Jul 21 11:11:04 axl inetd[18062]: write: Bad file descriptor >Fix: Not known at this time. Although the failure that causes the syslog message happens in flag_signal() at line 769 of inetd.c, I'm not sure why the pipe(2) call fails. Obviously, main() and config() are the two suspects to look at. ;-) I'll look at it when I have a moment, unless David Malone and the boys beat me to it. ;-) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message