From owner-freebsd-bugs@FreeBSD.ORG Wed May 20 15:00:05 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 CB30C1065675 for ; Wed, 20 May 2009 15:00:05 +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 B747B8FC1E for ; Wed, 20 May 2009 15:00:05 +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 n4KF05dD074298 for ; Wed, 20 May 2009 15:00:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n4KF05dN074297; Wed, 20 May 2009 15:00:05 GMT (envelope-from gnats) Date: Wed, 20 May 2009 15:00:05 GMT Message-Id: <200905201500.n4KF05dN074297@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Glen Barber 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: Glen Barber List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2009 15:00:06 -0000 The following reply was made to PR bin/134694; it has been noted by GNATS. From: Glen Barber To: Tobias Fendin Cc: hackers@freebsd.org, 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 10:42:58 -0400 Hi, Tobias On Wed, May 20, 2009 at 7:18 AM, 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. > # ssh someuser@localhost =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0// This didn't timeout or > anything, just didn't give any output. I killed it after a couple of > minutes. > ^C > [1]+ =A0Done =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0nc -l 22 > /tmp/ssh_t= est > # ssh someuser@localhost > The authenticity of host 'localhost (::1)' can't be established. > DSA key fingerprint is 9f:fa:ee:f5:39:c5:de:c4:8f:b9:c5:43:d8:9d:85:23. > Are you sure you want to continue connecting (yes/no)? ^C > # uname -a > FreeBSD asator 7.0-RELEASE-p2 FreeBSD 7.0-RELEASE-p2 #0: Thu Mar =A05 03:= 16:15 > CET 2009 =A0 =A0 root@asator:/usr/obj/usr/src/sys/A_KERNEL =A0i386 > > As you can see, the first execution of ssh connects to nc (which terminat= ed > when I killed the ssh client). And the second execution it gets through t= o > sshd (thus, sshd never failed at it's startup). > I don't know if this is the expected behavior, or if it has changed on > -CURRENT. > Perhaps sshd is checking for forked processes of itself, but not other daemons listening on that socket? --=20 Glen Barber