You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
curl --version spends 5 seconds waiting for OpenLDAP #23651
Because the version number returned so far in all known macOS versions
was the same, here's a PR dropping this query and returning AppleLDAP
instead: #23652. Upside is that it makes it easier to refer to this
backend, which uses the "legacy" LDAP curl interface, not the OpenLDAP
one.
The static version number is unimportant from a users/dev POV, and only
reflects the upstream OpenLDAP version that Apple forked way back. If
this changes in the future, we can revisit and add some kind of version.
It's not normal for gethostbyname() with the machine's own hostname to hang for 5 seconds. #8057 indicates that it happened to at least one other person before. I haven't investigated why it does that, surely it's unrelated to curl.
But regardless of that specific symptom, I think the issue is it's not good that curl --version can possibly do network queries (DNS). Arguably OpenLDAP's flaw, but still ends up being a problem in curl.
But regardless of that specific symptom, I think the issue is it's not good that `curl --version` can possibly do network queries (DNS). Arguably OpenLDAP's flaw, but still ends up being a problem in `curl`.
It isn't good, I agree. No unexpected/unwarranted network request is good IMO, regardless of the time it takes.
Activity
icing commentedon Oct 28, 2026
Not that I do not believe you, just to add some data:
vszakats commentedon Oct 28, 2026
Thanks for the report. Interesting! I wonder why it doesn't happen on
my machine to catch this earlier. Also not seen in CI, e.g.:
https://github.com/curl/curl/actions/runs/40692850852/job/122831844001#step:13:23
Because the version number returned so far in all known macOS versions
was the same, here's a PR dropping this query and returning
AppleLDAPinstead: #23652. Upside is that it makes it easier to refer to this
backend, which uses the "legacy" LDAP curl interface, not the OpenLDAP
one.
The static version number is unimportant from a users/dev POV, and only
reflects the upstream OpenLDAP version that Apple forked way back. If
this changes in the future, we can revisit and add some kind of version.
LukasGelbmann commentedon Oct 28, 2026
It's not normal for
gethostbyname()with the machine's own hostname to hang for 5 seconds. #8057 indicates that it happened to at least one other person before. I haven't investigated why it does that, surely it's unrelated to curl.But regardless of that specific symptom, I think the issue is it's not good that
curl --versioncan possibly do network queries (DNS). Arguably OpenLDAP's flaw, but still ends up being a problem incurl.vszakats commentedon Oct 28, 2026
It isn't good, I agree. No unexpected/unwarranted network request is good IMO, regardless of the time it takes.
LukasGelbmann commentedon Oct 28, 2026
Looks like the flaw was fixed on upstream (non-Apple) OpenLDAP in 2025: https://bugs.openldap.org/show_bug.cgi?id=10297
I think that indicates that the issue is already fixed on non-Apple platforms, as long as you're on a fairly new version of OpenLDAP (2.7.0+).
ldap: return 'AppleLDAP' version string for Apple's legacy OpenLDAP fork