Issues with OpenLDAP 2.2.4

Chris python at soltec.net
Thu Jan 15 21:50:54 CET 2004


I'm upgrading from OpenLDAP 2.1.22 to 2.2.4. Unfortunately, when I
rebuilt python-ldap I got a compile error in Modules/errors.c because
the definition of NUM_LDAP_ERRORS was negative, as it turns out the
ldap.h from 2.2.4 defines the API errors as negative numbers now, so the
problem here is obvious, Modules/errors.c reads:

#define NUM_LDAP_ERRORS		LDAP_REFERRAL_LIMIT_EXCEEDED+1
static PyObject* errobjects[ NUM_LDAP_ERRORS ];

When on my system ldap.h defines LDAP_REFERRAL_LIMIT_EXCEEDED as -17. So
I changed this to a positive number hoping my problem would be solved,
and my scripts just seg fault when an error is being returned. Further
looking into Modules/errors.c indicates to me that everything should be
fine so long as the array size I choose for errobjects is large enough
to accomodate all the error values it's populated with, but even with a
large enough value I get seg faults. Any help would be greatly
appreciated.

Thanks in advance,
Chris D.






More information about the python-ldap mailing list