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

Slurpd uses thread-unsafe function (ITS#2221)



Full_Name: Dave Horsfall
Version: 2.0.25
OS: FreeBSD 4.6-STABLE
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (192.65.182.30)


Although seen in 2.0.25, code inspection shows the same problem to be present in
2.0.27 and 2.1.8.

Slurpd, via libraries/libldap/os-ip.c, calls getaddrinfo() within the
replication thread, and on FreeBSD (and perhaps other systems) this function is
not thread-safe.  Symptom is that getaddrinfo() never returns when more than one
thread is spawned.

The simple fix would appear to be to not define HAVE_GETADDRINFO on FreeBSD
platforms and others where getaddrinfo() is not thread-safe.

If I knew my way around "configure" (which I don't), I'd submit a patch...