Skip to content

python-ldap declares ldap_init_fd #353

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
encukou opened this issue Jun 9, 2020 · 1 comment · Fixed by #354
Closed

python-ldap declares ldap_init_fd #353

encukou opened this issue Jun 9, 2020 · 1 comment · Fixed by #354

Comments

@encukou
Copy link
Member

encukou commented Jun 9, 2020

Currently, python-ldap carries a declaration of OpenLDAP's ldap_init_fd:

extern int
ldap_init_fd(ber_socket_t fd, int proto, LDAP_CONST char *url, LDAP **ldp);

This function is documented and declared in in openldap.h, but apparently distros don't ship openldap.h.

Unless there is some complication that I don't see, we should not declare this function. Distros should either ship openldap.h, or they could patch python-ldap to provide the declaration.

@encukou
Copy link
Member Author

encukou commented Jun 9, 2020

Apparently, <openldap.h> was added in OpenLDAP 2.4.48, only about 9 months ago: https://bugs.openldap.org/show_bug.cgi?id=8671

tiran added a commit to tiran/python-ldap that referenced this issue Jun 9, 2020
OpenLDAP 2.4.48 added openldap.h, which defines ldap_init_fd. Use the
header file with 2.4.48 and define the function for older versions.

The patch also cleans up #include. All OpenLDAP includes are now in
common.h and use global includes ``#include <ldap.h>`` instead of local
includes ``#include "ldap.h"``.

Fixes: python-ldap#353
See: https://bugs.openldap.org/show_bug.cgi?id=8671
Signed-off-by: Christian Heimes <cheimes@redhat.com>
tiran added a commit to tiran/python-ldap that referenced this issue Jun 9, 2020
OpenLDAP 2.4.48 added openldap.h, which defines ldap_init_fd. Use the
header file with 2.4.48 and define the function for older versions.

The patch also cleans up #include. All OpenLDAP includes are now in
common.h and use global includes ``#include <ldap.h>`` instead of local
includes ``#include "ldap.h"``.

Fixes: python-ldap#353
See: https://bugs.openldap.org/show_bug.cgi?id=8671
Signed-off-by: Christian Heimes <cheimes@redhat.com>
tiran added a commit to tiran/python-ldap that referenced this issue Jun 9, 2020
OpenLDAP 2.4.48 added openldap.h, which defines ldap_init_fd. Use the
header file with 2.4.48 and define the function for older versions.

The patch also cleans up #include. All OpenLDAP includes are now in
common.h and use global includes ``#include <ldap.h>`` instead of local
includes ``#include "ldap.h"``.

Fixes: python-ldap#353
See: https://bugs.openldap.org/show_bug.cgi?id=8671
Signed-off-by: Christian Heimes <cheimes@redhat.com>
encukou pushed a commit that referenced this issue Jun 18, 2020
OpenLDAP 2.4.48 added openldap.h, which defines ldap_init_fd. Use the
header file with 2.4.48 and define the function for older versions.

The patch also cleans up #include. All OpenLDAP includes are now in
common.h and use global includes ``#include <ldap.h>`` instead of local
includes ``#include "ldap.h"``.

Fixes: #353
See: https://bugs.openldap.org/show_bug.cgi?id=8671
Signed-off-by: Christian Heimes <cheimes@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant