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

Re: bind fallback



> If I call ldap_sasl_interactive_bind_s and it fails (e.g. because of a
> bug [1]) and then call ldap_simple_bind_s as a fallback it hangs. If I
> ldap_init again before calling ldap_simple_bind_s the fallback works. Is
> this expected behavior

no

> or is the bind state not being reset properly?

could be.

> I'm
> using 2.2.29 on Fedora Core 3.

You should upgrade to the latest 2.3 (2.3.27 currently) as the client
library saw significant improvements, while 2.2 is historic.

> Also, should I deinitialize the LDAP object? I see nothing in the
> documentation about an ldap_deinit or similar.

It's called ldap_unbind_ext(3) (used to be ldap_unbind(3), now
deprecated), and it's intended to be the opposite of ldap_initialize(3)
(formerly, ldap_init(3), now deprecated).  The name might sound
misleading; it comes from draft-ietf-ldapext-ldap-c-api.

> If not, how is that not
> a resource leak?

It is, unless you call ldap_unbind_ext(3).

p.



Ing. Pierangelo Masarati
OpenLDAP Core Team

SysNet s.n.c.
Via Dossi, 8 - 27100 Pavia - ITALIA
http://www.sys-net.it
------------------------------------------
Office:   +39.02.23998309
Mobile:   +39.333.4963172
Email:    pierangelo.masarati@sys-net.it
------------------------------------------