Skip to content
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

fix a bug that causes LDAP TLS connection flags to not be set properly #4190

Merged

Conversation

ryanpetrello
Copy link
Contributor

co-authored-by: Jim Ladd jladd@redhat.com

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

#
# see: https://github.com/python-ldap/python-ldap/issues/55
self.CONNECTION_OPTIONS = OrderedDict(
(k, v) for k, v in sorted(self.CONNECTION_OPTIONS.items())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like there are at least a couple of OPT_X_TLS.. options that come after OPT_X_TLS_NEWCTX (here's the list I get when looking at python-ldap). These would get put after OPT_X_TLS_NEWCTX if we apply the above sort.

Should we form an OrderedDict then explicitly append OPT_X_TLS_NEWCTX to the end? Something like this maybe:

Suggested change
(k, v) for k, v in sorted(self.CONNECTION_OPTIONS.items())
newctx_option = self.CONNECTION_OPTIONS.pop(ldap.OPT_X_TLS_NEWCTX, None)
self.CONNECTION_OPTIONS = OrderedDict(self.CONNECTION_OPTIONS)
if newctx_option:
self.CONNECTION_OPTIONS[dap.OPT_X_TLS_NEWCTX] = newctx_option

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit 5ce78b3 into ansible:devel Jul 1, 2019
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 this pull request may close these issues.

2 participants