Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Apr 2002 08:12:23 -0500
From:      "Jacques A. Vidrine" <nectar@FreeBSD.org>
To:        Hajimu UMEMOTO <ume@mahoroba.org>
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>
In-Reply-To: <ygeit6t150v.wl@piano.mahoroba.org>
References:  <200204151252.g3FCqYJ21117@freefall.freebsd.org> <ygeit6t150v.wl@piano.mahoroba.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <n@nectar.cc>                 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020415131223.GB33228>