Fix CA-less upgrade

In CA-less mode there's no /etc/pki/pki-tomcat/password.conf so it
does not make sense to try to create a password file for an NSS
database from it (the NSS database does not exist either).

https://fedorahosted.org/freeipa/ticket/5695

Reviewed-By: Jan Cholasta <jcholast@redhat.com>
This commit is contained in:
Stanislav Laznicka authored and Jan Cholasta committed 2017-03-01 15:38:43 +00:00
1 parent 88fd936a76
commit a7c8077ce8
1 file changed
+1 -1
+1 -1
View File
@@ -1537,7 +1537,7 @@ def upgrade_configuration():
# create passswd.txt file in PKI_TOMCAT_ALIAS_DIR if it does not exist
# this file will be required on most actions over this NSS DB in FIPS
if not os.path.exists(os.path.join(
if ca.is_configured() and not os.path.exists(os.path.join(
paths.PKI_TOMCAT_ALIAS_DIR, 'pwdfile.txt')):
ca.create_certstore_passwdfile()