[python-ldap] segfault/Abort for operations with unbound connection
Petr Viktorin
pviktori at redhat.com
Tue Jan 26 04:39:45 EST 2016
On 12/02/2015 04:29 PM, Space One wrote:
> Hello,
>
> 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:
>
> python-ldap 2.4.16-0.1
> Python 2.7.3 (default, Jul 2 2014, 15:00:03)
> [GCC 4.7.2] on linux2
>>>> import ldap
>>>> lo = ldap.initialize("ldap://0.0.0.0:7389")
>>>> lo.unbind_s()
>>>> lo.whoami_s()
> python: whoami.c:68: ldap_whoami: Assertion `(
> (ld)->ldc->ldc_options.ldo_valid == 0x2 )' failed.
> Aborted
Hello,
Christian Heimes wrote a patch to fix the segfault. Could you please
review it?
--
Petr Viktorin
--
https://github.com/pyldap/pyldap/pull/30
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Validate-LDAP-connection-in-whoami_s.patch
Type: text/x-patch
Size: 1535 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20160126/835719c3/attachment.bin>
More information about the python-ldap
mailing list