[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Recent changes in servers/slapd/daemon.c break AIX (ITS#839)



On Mon, Oct 16, 2000 at 01:45:01PM +0000, gombasg@inf.elte.hu wrote:
> Usage of getaddrinfo() in daemon.c breaks slapd on AIX. The problem is that
> the AIX implementation of getaddrinfo() does not fill in the sa_len and
> sa_family
> fields of the returned sockaddr structure.
> 
> The provided patch solves the problem (and another syntax error too). But I do

Thanks for tracking this down.

> not
> think that getaddrinfo() is a good idea at the moment, because different OSes
> implement
> it in incompatible ways. So either
> - OpenLDAP should provide it's own implementation of getaddrinfo() overriding
> the
>   native one, or
> - not using getaddrinfo() at all until some standard defines it better than
> RFC2133.

It is better defined in the POSIX drafts, but it's still a bit vague I
think. I think AIX might conform even if it doesn't fill in those fields.
Thus I think your fix is good, I should have done it like that in the
first place (:

> I'm having problems due to getaddrinfo() with Heimdal too, just because RFC2133
> does not define it precisely and the AIX implementation makes different
> assumptions
> than Heimdal. So currently I consider getaddrinfo() being non-portable (even if
> it's purpose would be quite the opposite).

Yes, there are some complications, but I would like to solve the problems
if/when they show up, there haven't been that many reports on problems
with 2.0.x and getaddrinfo, not yet anyway.

Note that 2133 is obsoleted by 2553, and there are updates of 2553 in
the works. Getaddrinfo is not better defined though, that's left to
the Austin Group (POSIX).

Stig