On Sun, Jun 22, 2003 at 08:47:25AM +0200, Oliver Graf wrote:
> On Sat, Jun 21, 2003 at 07:47:37PM -0400, Alan DeKok wrote:
> > Oliver Graf <[EMAIL PROTECTED]> wrote:
> > > > > This patchs enables the detection of the correct
> > > > > gethostby(name|addr)_r command, which is needed by a threaded radiusd.
> > 
> >   Unless I'm greatly mistaken, that functionality was added many
> > months ago.  See 'src/main/misc.c'
> 
> I don't see anything for gethostbyname_r. Or I have a different cvs
> than you.

I double checked this. There is no support in src/lib/misc.c for
glibc2 style gethostbyname_r (hostent as param, not as return value) in
cvs (I can't find src/main/misc.c, but this perhaps an typo of you).

> > > > I haven't looked at the diffs though, so it may not be relevant.
> > > 
> > > For me its relevant. Without freeradius is not thread-safe.
> > 
> >   But the server ALREADY uses the '..._r' functions.  What's the
> > problem?  Or am I missing something?
> 
> The BSD style check is done last. BSD style gethostbyxxxx is not
> thread safe on glibc2 systems. Cause the BSD check is done last, the
> configure script overwrites the previous detected GNU style
> gethostbyaddr_r. Just look at the diff, you will see that the sequence
> is changed (and a warning is added).

again, an cvs upd shows that the order is wrong and was wrong. at
least for me. Perhaps an autoconf oddity? I use autoconf 2.57. But I
can't remember that autoconf 1.x did it in another way. The last
definition goes, and as glibc2 systems both have gethostbyxxxx_r and
gethostbyxxxx, and the gethostbyxxxx check is done last, the configure
script will always prefer the bsd variant which uses static storage
and so is bad for threading.

iOliver.


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to