Subject: Re: [idn] How gethostbyname() handles 8-bit characters

From: "D. J. Bernstein" <[email-masked]>
Date: 3 Jun 2001 00:16:00 -0000

Adam M. Costello writes:
> Putting no-check-names into /etc/resolv.conf is obviously a workaround,
> a way to tell the library "get out of my way, I'm doing something
> experimental, and I'll take responsibility for it",

No. Name checking was a hasty patch in 1996 for security flaws in
programs that used gethostbyname() carelessly. See CERT advisory 96.04.

> My gut feeling is still that if gethostbyname() is going to start
> accepting 8-bit names, it should interpret them according to the charset
> of the current locale

As I said: ``There are other programming models that aren't consistent
with the current gethostbyname() semantics. This might be a sufficient
reason to break compatibility if those models were as nice as #2, but
they aren't.''

One of the many problems with allowing 8859-1 in this context is that
8859-1 doesn't have most of the characters we want to allow in IDNs.

> It would be instructive to see how gethostbyname() behaves in a locale
> for which the LDH characters do not occupy their ASCII code positions.

The UNIX programming model has always assumed ASCII---just as the future
UNIX programming model is going to assume UTF-8. Keep it simple, stupid.

---Dan