#1740 ldap: configure connection object rather than global state
Closed: migrated 3 years ago by dmoluguw. Opened 8 years ago by cheimes.

The pki.server package uses ldap.set_option(). The module function modifies global state. ldap.initialize() uses that global state to populate the LDAP connection object with default settings. Since the settings are global, concurrency issues can occure. At the moment it's not a big deal. pki.server is only used by installer and upgrade.

Instead of global configuration the same options can be set on each LDAP connection object. The set_option() call must occur right after initialize() and before bind:

import ldap
conn = ldap.initialize('...')
conn.set_option(...)
conn.bind_s(...)

Per CS/DS Meeting of 2016/01/25: 10.3 - trivial

[2016/01/25] - (this is an internal only change)

Metadata Update from @cheimes:
- Issue assigned to cheimes
- Issue set to the milestone: UNTRIAGED

7 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2298

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata Update from @dmoluguw:
- Issue close_status updated to: migrated
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata