Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Dec 2001 12:40:49 +0200
From:      Peter Pentchev <roam@ringlet.net>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        Dima Dorfman <dima@trit.org>, chris@FreeBSD.ORG, Igor M Podlesny <poige@morning.ru>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: jail.c.patch (allowing to use hostnames when invoking jail(8))
Message-ID:  <20011210124049.G757@straylight.oblivion.bg>
In-Reply-To: <3C141F9E.D7681BCC@mindspring.com>; from tlambert2@mindspring.com on Sun, Dec 09, 2001 at 06:36:14PM -0800
References:  <20011209205442.C8D0A3E2F@bazooka.trit.org> <3C141F9E.D7681BCC@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Dec 09, 2001 at 06:36:14PM -0800, Terry Lambert wrote:
> Dima Dorfman wrote:
> > Here's an updated patch which is a result of comments from a few
> > people.  The changes are: (a) deconfuse the usage message by not
> > naming two arguments as "hostname" (that was sloppiness on my part),
> > and (b) remove a redundant inet_aton call (gethostbyname(3) will DTRT
> > with an IP address) [1].
> > 
> > [1] It probably shouldn't, since as others have pointed out to me,
> > "1.1.1.1" is a valid DNS name.  The correct solution would be to have
> > a flag which makes it explicit whether the argument is an IP address
> > or DNS name, but few, if any, other programs in the system do this,
> > and I don't think this is a good place to start.
> 
> This is why the inte_aton() call is still necessary.
[snip]
> Please call inet_aton(), and then _only_ if that fails, call the
> gethostbyname().

How about inet_pton() and getnameinfo()?

G'luck,
Peter

-- 
If I had finished this sentence,

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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