diff options
author | Tomas Krizek <tkrizek@redhat.com> | 2016-10-27 10:31:45 +0200 |
---|---|---|
committer | Martin Basti <mbasti@redhat.com> | 2016-11-07 11:34:03 +0100 |
commit | 922062eb559d1bb82a9d787763aacb31c0cf9b8d (patch) | |
tree | 79b8d0f47a79d5c952e03adbd098a31e93ebd0c0 /install/tools/ipa-dns-install | |
parent | 36d95472d983ff342a43a5df36d932b9de8c32ac (diff) | |
download | freeipa-922062eb559d1bb82a9d787763aacb31c0cf9b8d.tar.gz freeipa-922062eb559d1bb82a9d787763aacb31c0cf9b8d.tar.xz freeipa-922062eb559d1bb82a9d787763aacb31c0cf9b8d.zip |
install tools: ldap conn management
* ipca-ca-install: Use a single ldap connection for the entire
script. Connecting with ccache in promote is not needed.
* ipa-cacert-manage: Always connect to ldap, since renew and install
are the only options and renew seems to need ldap connection even
for self signed certificates.
* ipa-compat-manage: Use one ldap connection for the entire script.
Replaced try-finally with proper disconnect, code block reindented.
* ipa-csreplica-manage: Properly establish and close the ldap connection.
* ipa-dns-install: Proper connect, disconnect to ldap.
* ipa-kra-install: Proper connect/disconnect for install and uninstall.
* ipa-ldap-update: Proper connect and disconnect to ldap.
* ipa-nis-manage: Proper connect/disconnect for ldap. Try-finally removed
and code block reindented.
* ipa-replica-manage: Proper connect/disconnect to ldap.
* ipa-replica-prepare: Connect added to validate_options(), where api is
initialized and disconnected added at the end of run. Reconnect in
ask_for_options() to validate directory manager password.
* ipa-server-certinstall: Use api.Backend.ldap2 for ldap connections.
* ipa-server-upgrade: Connect to and disconnect from api.Backend.ldap2.
https://fedorahosted.org/freeipa/ticket/6461
Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'install/tools/ipa-dns-install')
-rwxr-xr-x | install/tools/ipa-dns-install | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install index 05bd31556..99a139951 100755 --- a/install/tools/ipa-dns-install +++ b/install/tools/ipa-dns-install @@ -140,8 +140,7 @@ def main(): ) api.bootstrap(**cfg) api.finalize() - - api.Backend.ldap2.connect(autobind=True) + api.Backend.ldap2.connect() options.setup_ca = None # must be None to enable autodetection @@ -159,6 +158,8 @@ def main(): ipautil.run(['ipactl', 'start', '--ignore-service-failures'], raiseonerr=False) + api.Backend.ldap2.disconnect() + return 0 if __name__ == '__main__': |