[python-ldap] segfault/Abort for operations with unbound connection
Petr Viktorin
pviktori at redhat.com
Tue Jan 26 09:23:37 EST 2016
On 01/26/2016 12:06 PM, Michael Ströder wrote:
> Petr Viktorin wrote:
>> On 12/02/2015 04:29 PM, Space One wrote:
>>> how can I check if a connection is still valid? Is there some
>>> no-operation which is really fast?
>>> I tried to just use whoami_s() but this segfaults always:
>
> Thanks for the patch. Fix for Modules/LDAPObject.c will be released in 2.4.26.
>
> I also wonder whether ldap.ldapobject.LDAPObject.unbind_ext() should simply
> remove class attribute LDAPObject._l and a check be added to method
> LDAPObject._ldap_call(). That would be an approach which protects any C method
> implementation from being called for invalid LDAP connection.
Right, that would make it safer.
To address the original question, perhaps LDAPObject should grow a
utility method/attribute for checking if the _l is still there?
--
Petr Viktorin
More information about the python-ldap
mailing list