mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
ipaldap: merge IPAdmin to LDAPClient
* move IPAdmin methods to LDAPClient
* add extra arguments (cacert, sasl_nocanon) to LDAPClient.__init__()
* add host, port, _protocol to LDAPClient (parsed from ldap_uri)
* create get_ldap_uri() method to create ldap_uri from former
IPAdmin.__init__() arguments
* replace IPAdmin with LDAPClient + get_ldap_uri()
* remove ununsed function argument hostname from
enable_replication_version_checking()
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
4f1a6a1776
commit
5b81dbfda1
@@ -1877,7 +1877,8 @@ def print_port_conf_info():
|
||||
" UDP: 464, 123 (if NTP enabled)")
|
||||
|
||||
def get_certs_from_ldap(server, base_dn, realm, ca_enabled):
|
||||
conn = ipaldap.IPAdmin(server, sasl_nocanon=True)
|
||||
ldap_uri = ipaldap.get_ldap_uri(server)
|
||||
conn = ipaldap.LDAPClient(ldap_uri, sasl_nocanon=True)
|
||||
try:
|
||||
conn.gssapi_bind()
|
||||
certs = certstore.get_ca_certs(conn, base_dn, realm, ca_enabled)
|
||||
|
||||
Reference in New Issue
Block a user