Hi,
I=B4m using ActiveState Python 2.1 and OpenLDAP 2.0.11. Since I want to b=
e
able to access my LDAP tree using python, I came across the python ldap
web page. First of all it looks very fine, but I ran into a severe proble=
m=20
that I=B4m unable to solve by myself.
I patched python-ldap-1.10alpha3 to have a OpenLDAP 2.0.x conforming
constants.c. Then I tried to run configure.
First configure complained about a missing libldap.so, although it is in
the correct place (/usr/local/lib). I then patched configure to find it.
I built the module, but it could not load because of an symbol it could
not find. After some searching I found out, that I had to link the=20
module with libresolv.=20
After the next build I tried to run a little test program:
--- cut ---
import sys
import _ldap
l =3D _ldap.open("localhost")
l.simple_bind_s("", "")
res =3D l.search_s("o=3DMastyx,c=3DDE", _ldap.SCOPE_SUBTREE, "objectClass=
=3D*" )
print res
l.unbind()
=09
--- cut ---
And all it gives me is a:
Traceback (most recent call last):
File "tmp/foo.py", line 5, in ?
"objectClass=3D*" )
SystemError: Objects/dictobject.c:471: bad argument to internal function
=20
So I startet to strace the program.It connects to the server, sends a req=
uest
and gets back the first level unter the requested dn. Right after that it
bails out.
Does anyone of you have an idea what I can do to make it work?
bye, Daniel
ps. Currently I=B4m using utf8 encoded DNs but I testet it also with norm=
al
US ASCII encoded DNs and it did not work either.
|