From: Konstantin C. <Kon...@da...> - 2001-07-10 09:00:12
|
Hi Michael, Michael Ströder wrote: > David was working to incorporate your patches but did not commit > anything so far. The diffs based on your work he sent me does not > seem to work with recent OpenLDAP 2.0.11. It seems to me that the Yes, OpenLDAP-2.0.11 and especially recent changes in python-ldap CVS repository require a new version of patches. I've attached them. The patches don't change the behaviour of python-ldap when compiled against OpenLDAPv1, but create an alternative code when used with OpenLDAPv2. Here are the differences between python-ldap compiled against OpenLDAPv1 and v2 using the patches (seen from the point of view of a programmer using python-ldap): * new constants added for v2 (see constants.c.patch); * new errors/exceptions added for v2 (see errors.c.patch); * a set of LDAP session attributes changed: o only in v1: lberoptions (rw), refhoplimit (rw), options (rw), valid (ro); o only in v2: version (rw), referrals (rw), restart (rw); o in both versions: deref (rw), timelimit (rw), sizelimit (rw), errno (ro), error (ro), matched (ro). * new type of data added to the Python dictionary returned as a result of ldap_result: Dictionary keys are DNs, values are entry objects. If the key is empty, the value is the list of referrals (URL text strings). > > OpenLDAP 2 API is still subject to minor changes (e.g. > ldap_set_rebind_proc()). Unfortunately David is not available to I haven't touched set_rebind_proc in python-ldap yet, because that would change its API. At the moment you'll get a compile time warning and possible crash if you use rebind_proc with python-ldap + OpenLDAPv2. It is impossible to use the v1 set_rebind_proc syntax in v2. It is theoretically possible to use the OpenLDAPv2 syntax of the function with the OpenLDAPv1 library, using an internal conversion function. It would require some programming and (needs your approval) a change to the python-ldap API. Suggestions? Regards, Konstantin. -- * * Konstantin Chuguev - Application Engineer * * Francis House, 112 Hills Road * Cambridge CB2 1PQ, United Kingdom D A N T E WWW: http://www.dante.net |