latest ldap.i UPDATE!

Michael Ströder michael at stroeder.com
Wed May 30 20:54:58 CEST 2001


Joe Little wrote:
> 
> My only concern is your libraries. do an ldd on the ldapcmodule (there is
> also the lbermodule.so). Make sure it sees the same ldap libraries you
> built it with.

Off course I already did this every time. Seemed ok to me:

> ldd ldapcmodule.so 
        /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1
(0x40015000)
        libldap50.so =>
/home/michael/src/ldapcsdk50/lib/libldap50.so (0x40017000)
        libc.so.6 => /lib/libc.so.6 (0x40047000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
> ldd lbermodule.so 
        /lib/libNoVersion.so.1 => /lib/libNoVersion.so.1
(0x4000a000)
        libldap50.so =>
/home/michael/src/ldapcsdk50/lib/libldap50.so (0x4000c000)
        libc.so.6 => /lib/libc.so.6 (0x4003c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)

> I'd then use the test ldapsearch in Sacha's test directory (with the
> aforementioned changed in ldap.open instead of ldap.LDAP for opening a
> connection.

This did not work. I took a look at the source to figure out how it
works and tried to track things down by typing the actions manually.

Now please tell me what I did wrong in this transcript? It uses
ldapc.open() to make the connection. That's definitely not problem.
Maybe something's fishy with building "attrs"?

Python 2.1 (#8, Apr 20 2001, 19:22:23)
[GCC 2.95.2 19991024 (release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import ldapc
>>> attrs=ldapc.string_array(1)
>>> ldapc.string_set(attrs,0,'objectClass')
'objectClass'
>>> l=ldapc.open('localhost',389)
>>> resPtr=ldapc.makeLDAPMessagePtrPtr()
>>> status=ldapc.search_s(l,'O=MICHAELS',ldapc.SCOPE_BASE,
'(objectClass=*)',attrs,0,resPtr)
Segmentation fault

Am I doing something wrong?

Ciao, Michael.




More information about the python-ldap mailing list