Local Error in simple_bind_s();

Leons Petrazickis leonsp at ca.ibm.com
Wed Dec 19 20:05:04 CET 2007


Michael Ströder <michael at stroeder.com> wrote on 18/12/2007 05:05:16 PM:

> Leons Petrazickis wrote:
> >
> > I've installed Thorsten Kurbad's python_ldap-2.3.1-py2.4-linux-i686.egg
on
> > my Python 2.4 install
>
> Which OS? Which Linux distribution? Which OpenLDAP libs?

I was using:
Ubuntu 7.10 with Linux kernel 2.6.22-14-386
OpenLDAP 2.3.35-1ubuntu0.1
libsasl2 2.1.22.dfsg1-9ubuntu2
Python 2.4.4-6ubuntu4

Just now, I installed:
OpenLDAP 2.3.39

This command worked fine:
ldapsearch -h bluepages.ibm.com -P 2 -x -b "ou=bluepages,o=ibm.com" -s sub
"(sn=Leon)" cn tieline

But the python-ldap error stayed the same.

I then compiled a custom copy of python-ldap 2.3.1. I got these warnings
during compilation:
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found

(The files are not in the download.)

It compiled and installed without fatal errors. However, it now crashes
very differently:

Traceback (most recent call last):
  File "test.py", line 10, in ?
    ldap.set_option(ldap.OPT_DEBUG_LEVEL,4095)
  File
"/usr/lib/python2.4/site-packages/python_ldap-2.3.1-py2.4-linux-i686.egg/ldap/functions.py",
 line 126, in set_option
    _ldap_function_call(_ldap.set_option,option,invalue)
AttributeError: 'module' object has no attribute 'set_option'

Should I go back to the prebuilt .egg?

> Hmm, yes something's really strange.
>
> If on Linux could you please check with ldd
> <path-to-site-packages>/_ldap.so which OpenLDAP libs are actually used.

With Ubuntu's OpenLDAP:
linux-gate.so.1 =>  (0xffffe000)
libldap_r-2.3.so.0 => /usr/lib/libldap_r-2.3.so.0 (0xb7f2a000)
liblber-2.3.so.0 => /usr/lib/liblber-2.3.so.0 (0xb7f1d000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7f05000)
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7ec4000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7d81000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7d69000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c1f000)
libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7c0b000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7c07000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7bf2000)
/lib/ld-linux.so.2 (0x80000000)

With custom OpenLDAP:
linux-gate.so.1 =>  (0xffffe000)
libldap_r-2.3.so.0 => /usr/lib/libldap_r-2.3.so.0 (0xb7ebd000)
liblber-2.3.so.0 => /usr/lib/liblber-2.3.so.0 (0xb7eb0000)
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0xb7e98000)
libssl.so.0.9.8 => /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7e57000)
libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7d14000)
libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xb7cfc000)
libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bb2000)
libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7b9e000)
libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7b9a000)
libz.so.1 => /usr/lib/libz.so.1 (0xb7b85000)
/lib/ld-linux.so.2 (0x80000000)

Regards,

Leons Petrazickis
http://lpetr.org/blog



More information about the python-ldap mailing list