cURL / Mailing Lists / curl-library / Single Mail

curl-library

openldap loops forever

From: Patrick Monnerat <patrick.monnerat_at_dh.com>
Date: Wed, 20 Jan 2016 11:50:43 +0000

I have just discovered a regression in curl ldap handling via openldap.c module:
The transfer is OK, but the end is not detected and curl loops forever.

I don't know which commit introduced that problem. It used to work (long ago).
I have looked at the code without finding a way to fix it.

In short, here is what happens:

- Query is sent to an M$AD server with appropriate credentials.
- openldap routines return the entries and the referrals properly, but fails in trying to get entries from referrals because new connections are not bound properly.
- results are returned to curl. Data needed to reach code "ret = 0;" in ldap_recv() is not returned.
- next call to ldap_result returns 0 (timeout) with msg = NULL --> ldap_recv() returns -1 with CURLE_AGAIN.
- No more data comes to the socket, thus the subsequent polls are never successful --> loops forever.

You can exhibit the problem using the curl cli.
Maybe the problem is in the openldap lib and occurs only when referrals grabbing fails? I don't know enough about this lib to tell.

Patrick

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2016-01-20