perl-ldap/perl-ldap — pull request #27 by mauzo (2013-12-17 23:46:23+00:00)
Title: Handle SASL security layers correctly on rebind.

According to the RFC, if we are using a SASL security layer, then we
rebind and negotiate a new security layer, the new layer replaces the
old. If, on the other hand, the rebind doesn't negotiate a security
layer, then the old layer remains in place. Previously Net::LDAP was
attempting to apply the new layer (if any) on top of the old layer,
which is incorrect.

Rebind was also failing if a security layer had previously been
negotiated since the security-layer filehandle doesn't support socket
operations. Since we now need to keep the raw (TCP or SSL) filehandle
around anyway, we can do the socket operations on that instead.