Full_Name: Laurent Sabourin
Version: openldap-2.4.48
OS: Windows
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (216.218.42.174)
I am using OpenLDAP libraries within my software for my LDAP client
implementation.
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
off initially.
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.
Expected behavior:
I would expect the LDAP session handle to retain original options even when it
reconnects drop connections.