ldap_whoami_s availability in OpenLDAP libs
Bernard Gardner
bernard at geekHaus.net.au
Mon Jul 19 08:02:13 CEST 2004
On 30 Mar 2004, at 2:50 AM, Michael Ströder wrote:
> * Function l_ldap_whoami_s() only added if built against
> OpenLDAP 2.1.x+ libs (should preserve compability with 2.0 libs)
Hi Michael,
I just tried to build python-ldap-2.0.1 against OpenLDAP 2.1.11 and
found
out that this isn't quite right. The patch below seems to fix it. I
think
the function was introduced in OpenLDAP 2.1.13 based on:
http://www.openldap.org/devel/cvsweb.cgi/libraries/libldap/whoami.c
Obviously this is only a problem for a tiny minority of users (quite
possibly only me :)
Thanks,
Bernard.
*** LDAPObject.c.orig Mon Jul 19 15:47:03 2004
--- LDAPObject.c Mon Jul 19 15:47:31 2004
***************
*** 852,859 ****
}
! #if LDAP_VENDOR_VERSION>=20100
! /* ldap_whoami_s (available since OpenLDAP 2.1.x) */
static PyObject*
l_ldap_whoami_s( LDAPObject* self, PyObject* args )
--- 852,859 ----
}
! #if LDAP_VENDOR_VERSION>=20113
! /* ldap_whoami_s (available since OpenLDAP 2.1.13) */
static PyObject*
l_ldap_whoami_s( LDAPObject* self, PyObject* args )
***************
*** 987,993 ****
#ifdef HAVE_TLS
{"start_tls_s", (PyCFunction)l_ldap_start_tls_s,
METH_VARARGS },
#endif
! #if LDAP_VENDOR_VERSION>=20100
{"whoami_s", (PyCFunction)l_ldap_whoami_s,
METH_VARARGS },
#endif
{"manage_dsa_it", (PyCFunction)l_ldap_manage_dsa_it,
METH_VARARGS },
--- 987,993 ----
#ifdef HAVE_TLS
{"start_tls_s", (PyCFunction)l_ldap_start_tls_s,
METH_VARARGS },
#endif
! #if LDAP_VENDOR_VERSION>=20113
{"whoami_s", (PyCFunction)l_ldap_whoami_s,
METH_VARARGS },
#endif
{"manage_dsa_it", (PyCFunction)l_ldap_manage_dsa_it,
METH_VARARGS },
More information about the python-ldap
mailing list