-
Notifications
You must be signed in to change notification settings - Fork 126
Allow LDAP connection from file descriptor #337
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
Conversation
35e288f
to
8c40832
Compare
* ldap_init_fd() is not a private API but it's not in a public header either | ||
* SSSD has been using the function for a while, so it's probably OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there any plans to make it public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know why it hasn't landed in upstream headers. The API has been around for a while and it's stable. SSSD uses it heavily.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an RFE open?
I'm worried by the extern declaration: OpenLDAP is free to add a ldap_init_fd
function to the public headers, and even make the declaration a bit different. (Would e.g. unsigned int proto
be enough to cause python-ldap to fail to build?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been document with the exact same function signature for 13 years, openldap/openldap@282a3c5 . It's unlikely that the function will disappear or change signature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Could you make sure OpenLDAP devs know, though?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK.
Could you make sure OpenLDAP devs know, though?
The statement was false. It is provided in the public openldap.h header file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... which is not packaged by most distributions like Debian/Ubuntu or Fedora/RHEL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... which is not packaged by most distributions like Debian/Ubuntu or Fedora/RHEL.
Then you need to talk to the distributions, not the OpenLDAP developers.
set_option() and get_option() now verify that LDAPObject is valid. This fixes an assertion error and possible segfault after unbind_ext(). Signed-off-by: Christian Heimes <cheimes@redhat.com>
968f2ae
to
e6a0a38
Compare
Codecov Report
@@ Coverage Diff @@
## master #337 +/- ##
==========================================
- Coverage 71.38% 70.49% -0.89%
==========================================
Files 49 49
Lines 4837 4871 +34
Branches 808 816 +8
==========================================
- Hits 3453 3434 -19
- Misses 1050 1084 +34
- Partials 334 353 +19
Continue to review full report at Codecov.
|
``ldap.initialize()`` now takes an optional fileno argument to create an LDAP connection from a connected socket. See: python-ldap#178 Signed-off-by: Christian Heimes <cheimes@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, Travis CI is not reporting results. But the build for e59905c passed: https://travis-ci.org/github/python-ldap/python-ldap/builds/695145760
ldap.initialize()
now takes an optional fileno argument to create anLDAP connection from a connected socket.
set_option() and get_option() now verify that LDAPObject is valid. This
fixes an assertion error and possible segfault after unbind_ext().