From owner-freebsd-hackers@FreeBSD.ORG Wed May 20 14:41:00 2009 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D739A106567F for ; Wed, 20 May 2009 14:41:00 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: from mail-fx0-f168.google.com (mail-fx0-f168.google.com [209.85.220.168]) by mx1.freebsd.org (Postfix) with ESMTP id 5E1138FC1D for ; Wed, 20 May 2009 14:40:59 +0000 (UTC) (envelope-from glen.j.barber@gmail.com) Received: by fxm12 with SMTP id 12so474174fxm.43 for ; Wed, 20 May 2009 07:40:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=I4XE6u+6l+4GqVypeHOeBua0gIOiwseWJLqgs5e8y7A=; b=sltvB0MX23gZ7bLS0lmqGVTR6q8iOXeIrUMPGUkUg8tSaEphd1sA6gX9KJOoc/BUNL 9zVagRhOV3wS0zI+gN1neAxJscLyEVVTWJDliNu1jdKRG+YnBbAFI+DRVGn5CFOlt6ED 8T4WTG8huaGqs0JpH/v9Lb7XPAP3LTTso4mtE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=mpifnpSk++uK0FR5WurjUpcKeFLSSzS6k8TrEAi29lMT217We8hIAiyzCO132QvBd/ 1uTmWQ8QF4fvNYuFB1Ral428cGxMWgBmpzbWf/FvJ9Ku9m8lxYNMS45lKA6nZL/jEvVw oC7Ub+kmWW8v2HT3lzld2VUAElUeiz+NYrer4= MIME-Version: 1.0 Received: by 10.223.117.1 with SMTP id o1mr1017885faq.96.1242830459181; Wed, 20 May 2009 07:40:59 -0700 (PDT) In-Reply-To: <4A13E906.7020907@andric.com> References: <4ad871310905181949s2874795eoa5ddf425746310bf@mail.gmail.com> <4A13E180.1040606@andric.com> <4A13E6F7.7070309@glocalnet.net> <4A13E906.7020907@andric.com> Date: Wed, 20 May 2009 10:40:59 -0400 Message-ID: <4ad871310905200740n744f9b83j96db2a3c1a6bec43@mail.gmail.com> From: Glen Barber To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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] X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 May 2009 14:41:01 -0000 Hi, Dimitry On Wed, May 20, 2009 at 7:27 AM, Dimitry Andric wrote: > 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. =A0The IPv4 bind > fails, as you will see in syslog, while the IPv6 bind succeeds. =A0Thus > 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. > It's not an IPv4 versus IPv6 problem. How I tested this, as I had this problem in the past (which was a non-standard setup, but still a problem): sshd was listening on :25, both IPv4 and IPv6 sendmail was listening on :25 (because I had forgotten to disable it) The system boots, and sendmail starts before sshd. When sshd starts (or tries to) there is no console output that it had failed. The only way you realize it is not running, is when you cannot remotely log in. --=20 Glen Barber