|
From: Michael S. <mi...@st...> - 2009-03-20 20:55:34
|
Sean,
many thanks for digging through this. Does that mean your issues with
syncrepl controls and l_ldap_result3() are fixed?
Any particular reason why you're using python-ldap 2.3.1 which is almost
two years old?
Sean Burford wrote:
> When LDAPError receives an errnum from ldap_get_option(l,
> LDAP_OPT_ERROR_NUMBER, &errnum) that is out of bounds it causes a
> segfault. I have attached a script that triggers it and patch that
> fixes it.
So after applying your patch I get this generic LDAPError exception
below. This is definitely more robust.
ldap.LDAPError: {'info': 'sync cookie is stale', 'desc': 'Content Sync
Refresh Required'}
Anyway I'd see some benefit adding also the syncrepl error codes to let
the application catch specific exceptions. Unfortunately errobjects in
Modules/errors.c is a simple array. Bumping up LDAP_ERROR_MAX to
LDAP_SYNC_REFRESH_REQUIRED would be pretty naively waste a lot of space.
Ciao, Michael.
|