Date: Mon, 15 Apr 2002 22:10:40 +0900 From: Hajimu UMEMOTO <ume@mahoroba.org> To: Jacques Vidrine <nectar@FreeBSD.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: <ygeit6t150v.wl@piano.mahoroba.org> In-Reply-To: <200204151252.g3FCqYJ21117@freefall.freebsd.org> References: <200204151252.g3FCqYJ21117@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
>>>>> On Mon, 15 Apr 2002 05:52:34 -0700 (PDT)
>>>>> Jacques Vidrine <nectar@FreeBSD.org> said:
nectar> nectar 2002/04/15 05:52:34 PDT
nectar> Modified files: (Branch: RELENG_4)
nectar> include unistd.h
nectar> lib/libc/net Makefile.inc rcmd.c
nectar> Added files: (Branch: RELENG_4)
nectar> lib/libc/net rcmdsh.3 rcmdsh.c
nectar> Log:
nectar> MFC: 1.44 include/unistd.h
nectar> 1.2 lib/libc/net/rcmdsh.3
nectar> 1.3 lib/libc/net/rcmdsh.c
nectar> 1.43 lib/libc/net/Makefile.inc
nectar> 1.32 lib/libc/net/rcmd.c
nectar> Support for specifying rsh alternative.
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().
--
Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
ume@mahoroba.org ume@bisd.hitachi.co.jp ume@{,jp.}FreeBSD.org
http://www.imasy.org/~ume/
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?ygeit6t150v.wl>
