Segmentation fault
Marc Petitmermet
petitmermet at mat.ethz.ch
Fri Feb 6 15:18:11 CET 2004
dear list members
i have the python code below (from initialize.py) to test ldap
connection over ssh to an external ldap-server.
on my production system with python-2.1.3, python-ldap-2.0.0pre06,
openldap-2.1.12, openssl-0.9.7c i get a correct output. but when using
my development system with python-2.1.3, python-ldap-2.0.0pre19,
openldap-2.1.23, openssl-0.9.7c i get a segmentation fault:
*** ldaps://x.x.xx:636 - SimpleLDAPObject.set_option ((17, 3),{})
*** ldaps://x.x.xx:636 - SimpleLDAPObject.set_option ((17, 3),{})
*** ldaps://x.x.xx:636 - SimpleLDAPObject.bind (('', '', 128),{})
ldap_bind
ldap_simple_bind
ldap_sasl_bind
ldap_send_initial_request
ldap_new_connection
ldap_int_open_connection
ldap_connect_to_host: x.x.xx
ldap_new_socket: 3
ldap_prepare_socket: 3
ldap_connect_to_host: Trying xxx.xxx.xx.xxx:636
ldap_connect_timeout: fd: 3 tm: -1 async: 0
ldap_ndelay_on: 3
ldap_is_sock_ready: 3
ldap_ndelay_off: 3
ldap_int_sasl_open: host=x.x.xx
TLS trace: SSL_connect:before/connect initialization
TLS trace: SSL_connect:SSLv2/v3 write client hello A
TLS trace: SSL_connect:SSLv3 read server hello A
TLS certificate verification: depth: 1, subject: xx
emailAddress=xx at x.x.xx, issuer: xx emailAddress=xx at x.x.xx
TLS trace: SSL_connect:SSLv3 read server certificate A
TLS trace: SSL_connect:SSLv3 read server done A
TLS trace: SSL_connect:SSLv3 write client key exchange A
TLS trace: SSL_connect:SSLv3 write change cipher spec A
TLS trace: SSL_connect:SSLv3 write finished A
TLS trace: SSL_connect:SSLv3 flush data
TLS trace: SSL_connect:SSLv3 read finished A
Segmentation fault
can anybody tell me how to solve this? i don't think that this can be
ignored. i guess that this is also the cause for my problems with the
latest LDAPUserFolder which i wanted to use with zope.
thanks in advance for any hints.
regards,
marc
------------------------------------------------
test code:
import sys,ldap
# Set debugging level
ldap.set_option(ldap.OPT_DEBUG_LEVEL,255)
ldapmodule_trace_level = 1
ldapmodule_trace_file = sys.stderr
print
"""##################################################################
# LDAPv3 connection over SSL
##################################################################
"""
# Create LDAPObject instance (one single line command below)
l = ldap.initialize(
'ldaps://x.x.xx:636',
trace_level=ldapmodule_trace_level,
trace_file=ldapmodule_trace_file)
# Set LDAP protocol version used
l.protocol_version=ldap.VERSION3
# Try a bind to provoke failure if protocol version is not supported
l.bind_s('','',ldap.AUTH_SIMPLE)
# Close connection
l.unbind_s()
More information about the python-ldap
mailing list