Crash in gethostbyname() on congruent usage

u-uclibc-cmdy at aetey.se u-uclibc-cmdy at aetey.se
Wed Dec 12 20:49:17 UTC 2012


On Wed, Dec 12, 2012 at 02:30:40PM -0500, Rich Felker wrote:
> Note that your argument that it should not be possible to replace the
> global DNS namespace with a local hack is a _policy_ argument, not a

Kind of.

> In short, getaddrinfo "should" (per sane policy) be DNS, plus possibly
> some set of local names from /etc/hosts that don't conflict with DNS
> names. Applications should not (and ultimately can't, in the case of
> the example I gave above) attempt to work around bad policy.

Alas, in a general cases the applications indeed can not work around, but
as much as possible they should not depend on the policies applied at a
wrong place. The implementations and standards should not help/encourage
such bad policies, which they unfortunately do.

Anyway, getaddrinfo() is what we have and ranting about it does not
help. I am badly missing a "real" DNS resolver in the standard library -
getaddrinfo() is not sufficient even if we forget about its NSS
background - but that's life.

Regards,
RL



More information about the uClibc mailing list