From: Leons P. <le...@ca...> - 2007-12-29 22:05:13
|
Hi Michael, I now have a fresh Ubuntu 7.10 install with OpenLDAP 2.1 in /usr/lib an= d a manually compiled OpenLDAP 2.3.39 in /usr/local/lib. The appropriate dirs are in setup.cfg: library_dirs =3D /usr/local/lib include_dirs =3D /usr/local/include /usr/include/sasl ldd _ldap.so says that python-ldap links to the right one: linux-gate.so.1 =3D> (0xffffe000) libldap_r-2.3.so.0 =3D> /usr/local/lib/libldap_r-2.3.so.0 (0xb7f36000) liblber-2.3.so.0 =3D> /usr/local/lib/liblber-2.3.so.0 (0xb7f29000) libsasl2.so.2 =3D> /usr/lib/libsasl2.so.2 (0xb7f06000) libssl.so.0.9.8 =3D> /usr/lib/i686/cmov/libssl.so.0.9.8 (0xb7ec5000) libcrypto.so.0.9.8 =3D> /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7d820= 00) libpthread.so.0 =3D> /lib/tls/i686/cmov/libpthread.so.0 (0xb7d6a000) libc.so.6 =3D> /lib/tls/i686/cmov/libc.so.6 (0xb7c20000) libresolv.so.2 =3D> /lib/tls/i686/cmov/libresolv.so.2 (0xb7c0c000) libdl.so.2 =3D> /lib/tls/i686/cmov/libdl.so.2 (0xb7c08000) libz.so.1 =3D> /usr/lib/libz.so.1 (0xb7bf3000) /lib/ld-linux.so.2 (0x80000000) Doing a simple_bind_s() on ldap.openldap.org works: ... wait4msg ld 0x81e50b8 msgid 1 (infinite timeout) wait4msg continue ld 0x81e50b8 msgid 1 all 1 ** ld 0x81e50b8 Connections: * host: ldap.openldap.org port: 389 (default) refcnt: 2 status: Connected last used: Sat Dec 29 15:11:47 2007 ** ld 0x81e50b8 Outstanding Requests: * msgid 1, origid 1, status InProgress outstanding referrals 0, parent count 0 ** ld 0x81e50b8 Response Queue: Empty ldap_chkResponseList ld 0x81e50b8 msgid 1 all 1 ldap_chkResponseList returns ld 0x81e50b8 NULL ldap_int_select read1msg: ld 0x81e50b8 msgid 1 all 1 read1msg: ld 0x81e50b8 msgid 1 message type bind new result: res_errno: 0, res_error: <>, res_matched: <> read1msg: ld 0x81e50b8 0 new referrals read1msg: mark request completed, ld 0x81e50b8 msgid 1 request done: ld 0x81e50b8 msgid 1 res_errno: 0, res_error: <>, res_matched: <> ldap_free_request (origid 1, msgid 1) ldap_free_connection 0 1 ldap_free_connection: refcnt 1 ldap_parse_result ldap_msgfree =3D> result: (97, [], 1, []) ldap_free_connection 1 1 ldap_send_unbind ldap_free_connection: actually freed But a simple_bind_s() on bluepages.ibm.com doesn't: wait4msg continue ld 0x81e4ef0 msgid 1 all 1 ** ld 0x81e4ef0 Connections: * host: bluepages.ibm.com port: 636 (default) refcnt: 2 status: Connected last used: Sat Dec 29 15:11:16 2007 ** ld 0x81e4ef0 Outstanding Requests: * msgid 1, origid 1, status InProgress outstanding referrals 0, parent count 0 ** ld 0x81e4ef0 Response Queue: Empty ldap_chkResponseList ld 0x81e4ef0 msgid 1 all 1 ldap_chkResponseList returns ld 0x81e4ef0 NULL ldap_int_select read1msg: ld 0x81e4ef0 msgid 1 all 1 ldap_err2string =3D> LDAPError - LOCAL_ERROR: {'desc': 'Local error'} Traceback (most recent call last): File "test.py", line 10, in <module> l.simple_bind_s(); File "/usr/lib/python2.5/site-packages/ldap/ldapobject.py", line 199, in simple_bind_s return self.result(msgid,all=3D1,timeout=3Dself.timeout) File "/usr/lib/python2.5/site-packages/ldap/ldapobject.py", line 428, in result res_type,res_data,res_msgid =3D self.result2(msgid,all,timeout) File "/usr/lib/python2.5/site-packages/ldap/ldapobject.py", line 432, in result2 res_type, res_data, res_msgid, srv_ctrls =3D self.result3(msgid,all,timeout) File "/usr/lib/python2.5/site-packages/ldap/ldapobject.py", line 438, in result3 rtype, rdata, rmsgid, serverctrls =3D self._ldap_call(self._l.result3,msgid,all,timeout) File "/usr/lib/python2.5/site-packages/ldap/ldapobject.py", line 97, in _ldap_call result =3D func(*args,**kwargs) ldap.LOCAL_ERROR: {'desc': 'Local error'} ldap_free_request (origid 1, msgid 1) ldap_free_connection 1 1 ldap_send_unbind ldap_free_connection: actually freed However, ldapsearch doesn't crash at this point: ... ** ld 0x8084d08 Response Queue: Empty ldap_chkResponseList ld 0x8084d08 msgid 1 all 1 ldap_chkResponseList returns ld 0x8084d08 NULL ldap_int_select read1msg: ld 0x8084d08 msgid 1 all 1 ber_get_next ber_get_next: tag 0x30 len 16 contents: read1msg: ld 0x8084d08 msgid 1 message type bind ber_scanf fmt ({eaa) ber: read1msg: ld 0x8084d08 0 new referrals read1msg: mark request completed, ld 0x8084d08 msgid 1 request done: ld 0x8084d08 msgid 1 res_errno: 0, res_error: <>, res_matched: <> ... It probably uses the OpenLDAP 2.1 libraries, though. I could make it us= e the 2.3 ones if it would help. Michael Str=F6der <mi...@st...> wrote on 22/12/2007 07:18:31 A= M: > > Out of curiosity: What kind of server is this (vendor/version)? It's Tivoli Directory Server 5.2: dn: namingcontexts: CN=3DSCHEMA namingcontexts: CN=3DLOCALHOST namingcontexts: CN=3DPWDPOLICY namingcontexts: CN=3DIBMPOLICIES namingcontexts: O=3DIBM.COM namingcontexts: O=3DDELETED.IBM.COM subschemasubentry: cn=3Dschema ... secureport: 636 security: ssl port: 389 supportedsaslmechanisms: CRAM-MD5 supportedsaslmechanisms: DIGEST-MD5 supportedldapversion: 2 supportedldapversion: 3 ibmdirectoryversion: 5.2 ibm-ldapservicename: d03ldr215a ibm-serverId: 34519bc0-4c01-102b-8a2e-caf840af47c5 ... vendorname: International Business Machines (IBM) vendorversion: 5.2 ... ibm-slapdisconfigurationmode: FALSE ibm-slapdSizeLimit: 100000 ibm-slapdTimeLimit: 0 ibm-slapdDerefAliases: never ibm-supportedAuditVersion: 2 ibm-sasldigestrealmname: d03ldr215a Could the blank dn be a problem? What can I do? What can I log? I tried telneting to the ldap server, bu= t that didn't give any useful output. Thanks, Leons Petrazickis http://lpetr.org/blog/= |