Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Jun 2003 19:45:10 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        current@FreeBSD.org
Subject:   Re: Bogus "temporary" gethostbyaddr_r() in libc for 6 years
Message-ID:  <3EED2F36.91132A4E@mindspring.com>
References:  <20030616015459.GA35478@rot13.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Kris Kennaway wrote:
> There's a bogus implementation of gethostbyaddr_r() in
> lib/libc/net/gethostnamadr.c that was committed 6 years and nine
> months ago:
[...]
> What's the deal here? Despite the fact that this is not prototyped in
> a header, some ports are detecting this, and -- one assumes -- not
> behaving correctly since this implementation isn't thread-safe.

It should be removed.

It's really hard to write a multithreaded version of this function,
since it's essentially a request/response protocol.  The most correct
implementation would use a seperate worker thread and queue requests
to it.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EED2F36.91132A4E>