From 0db48e4d04b3b8377667b388b88f2fe9f57bf4a3 Mon Sep 17 00:00:00 2001 From: Stanislav Laznicka Date: Wed, 22 Jun 2016 16:08:49 +0200 Subject: [PATCH] Fix to ipa-ca-install asking for host principal password With a ca_cert_file specified in options, the nss_db was used before the certificates from the file were added to it, which caused an exception that led to fallback to ssh which is broken. https://fedorahosted.org/freeipa/ticket/5965 Reviewed-By: Martin Basti Reviewed-By: Jan Cholasta --- install/tools/ipa-replica-conncheck | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install/tools/ipa-replica-conncheck b/install/tools/ipa-replica-conncheck index 991f4e429..e308b118f 100755 --- a/install/tools/ipa-replica-conncheck +++ b/install/tools/ipa-replica-conncheck @@ -462,10 +462,6 @@ def main(): nss_dir = paths.IPA_NSSDB_DIR with certdb.NSSDatabase(nss_dir) as nss_db: - api.bootstrap(context='client', xmlrpc_uri=xmlrpc_uri, - nss_dir=nss_db.secdir) - api.finalize() - if options.ca_cert_file: nss_dir = nss_db.secdir @@ -483,6 +479,9 @@ def main(): else: nss_dir = None + api.bootstrap(context='client', xmlrpc_uri=xmlrpc_uri, + nss_dir=nss_db.secdir) + api.finalize() try: api.Backend.rpcclient.connect() api.Command.ping()