From owner-freebsd-bugs@FreeBSD.ORG Wed May 20 11:30:03 2009 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D72411065673 for ; Wed, 20 May 2009 11:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C30548FC21 for ; Wed, 20 May 2009 11:30:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n4KBU3Fo087663 for ; Wed, 20 May 2009 11:30:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4KBU3Nm087658; Wed, 20 May 2009 11:30:03 GMT (envelope-from gnats) Date: Wed, 20 May 2009 11:30:03 GMT Message-Id: <200905201130.n4KBU3Nm087658@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Dimitry Andric Cc: Subject: Re: bin/134694: gives false-positive when unable to obtain socket [WAS: sshd(8) - alert user when fails to execute from rc.d] X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Dimitry Andric List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2009 11:30:04 -0000 The following reply was made to PR bin/134694; it has been noted by GNATS. From: Dimitry Andric To: Tobias Fendin Cc: rea-fbsd@codelabs.ru, hackers@freebsd.org, Glen Barber , bug-followup@freebsd.org Subject: Re: bin/134694: gives false-positive when unable to obtain socket [WAS: sshd(8) - alert user when fails to execute from rc.d] Date: Wed, 20 May 2009 13:27:02 +0200 On 2009-05-20 13:18, Tobias Fendin wrote: > Does the child really die? I did a little test: > > # /etc/rc.d/sshd status > sshd is not running. > # nc -l 22 >/tmp/ssh_test & > [1] 1733 > # /etc/rc.d/sshd start > Starting sshd. > # /etc/rc.d/sshd status > sshd is running as pid 1740. This is because sshd binds to both IPv4 and IPv6 ports. The IPv4 bind fails, as you will see in syslog, while the IPv6 bind succeeds. Thus sshd keeps on running. If you start two nc's (I don't know any way to do this with one instance), e.g.: nc -4 -l 22 > /tmp/ssh_test4 & nc -6 -l 22 > /tmp/ssh_test6 & and then try starting sshd, you should see it quit.