From: Sean B. <uni...@gm...> - 2009-03-20 19:14:18
|
Hi, 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. The test script requires an ldap URI and a BaseDN on the command line. The ldap server can be OpenLDAP 2.3 or 2.4 and the BaseDN should be configured with a syncprov overlay and have syncprov-reloadhint TRUE. eg: /tmp/ldap-segfault.py ldap://ldap.example.com dc=example,dc=com After patching _ldap.so we get a valid Exception: Traceback (most recent call last): File "/tmp/ldap-segfault.py", line 39, in ? rtype, rdata, rmsgid, serverctrls = conn.result3(all=1, timeout=60) File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 438, in result3 rtype, rdata, rmsgid, serverctrls = self._ldap_call(self._l.result3,msgid,all,timeout) File "/usr/lib/python2.4/site-packages/ldap/ldapobject.py", line 97, in _ldap_call result = func(*args,**kwargs) ldap.LDAPError: {'info': 'sync cookie is stale', 'desc': 'Content Sync Refresh Required'} -- Thanks, Sean Burford |