Full_Name: Laurent Sabourin
Submission from: (NULL) (188.8.131.52)
I am using OpenLDAP libraries within my software for my LDAP client
For the LDAP session handles where I set the option LDAP_OPT_REFERRALS to
LDAP_OPT_OFF, it seems that that option is not being propagated when OpenLDAP
reconnects after the server dropped the initial connection. Because of that, all
subsequent searches start following referrals even though the option was turned
How to reproduce:
1- Make a LDAP search to LDAP server that returns referrals (Windows AD in my
case) with referrals turned off. The search doesn't follow referrals.
2- Drop the connection with the LDAP server (I used SysInternals TCPView to
force the connection to close)
3- Make the same LDAP search using the same LDAP session handle used in step 1.
OpenLDAP reconnects, but the search unexpectedly follows the referrals.
I would expect the LDAP session handle to retain original options even when it
reconnects drop connections.