From owner-cvs-all Mon Apr 15 6:12:32 2002 Delivered-To: cvs-all@freebsd.org Received: from gw.nectar.cc (gw.nectar.cc [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 5873537B404; Mon, 15 Apr 2002 06:12:26 -0700 (PDT) Received: from madman.nectar.cc (madman.nectar.cc [10.0.1.111]) by gw.nectar.cc (Postfix) with ESMTP id F3A9E38; Mon, 15 Apr 2002 08:12:25 -0500 (CDT) Received: from madman.nectar.cc (localhost [IPv6:::1]) by madman.nectar.cc (8.12.2/8.11.6) with ESMTP id g3FDCPXY033250; Mon, 15 Apr 2002 08:12:25 -0500 (CDT) (envelope-from nectar@madman.nectar.cc) Received: (from nectar@localhost) by madman.nectar.cc (8.12.2/8.12.2/Submit) id g3FDCNnU033249; Mon, 15 Apr 2002 08:12:23 -0500 (CDT) Date: Mon, 15 Apr 2002 08:12:23 -0500 From: "Jacques A. Vidrine" To: Hajimu UMEMOTO Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/include unistd.h src/lib/libc/net Makefile.inc rcmd.c rcmdsh.3 rcmdsh.c Message-ID: <20020415131223.GB33228@madman.nectar.cc> Mail-Followup-To: "Jacques A. Vidrine" , Hajimu UMEMOTO , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200204151252.g3FCqYJ21117@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-Url: http://www.nectar.cc/ Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, Apr 15, 2002 at 10:10:40PM +0900, Hajimu UMEMOTO wrote: > It seems rcmdsh() prevents from using IP address by following code: > > /* Validate remote hostname. */ > if (strcmp(*ahost, "localhost") != 0) { > if ((hp = gethostbyname(*ahost)) == NULL) { > herror(*ahost); > return (-1); > } > *ahost = hp->h_name; > } > > There is similar codo with rcmdsh() in NetBSD's rcmd.c, but without > above checking. It seems it is better removing above checking. > Furthermore, the code is strict to an IPv4. So, if leaving it as is, > I'll change it to use getaddrinfo(). Please feel free to make whatever modification is necessary. Cheers, -- Jacques A. Vidrine http://www.nectar.cc/ NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message