summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Cholasta <jcholast@redhat.com>2017-04-03 10:49:26 +0000
committerJan Cholasta <jcholast@redhat.com>2017-04-04 08:21:50 +0000
commit5f5a3b29dba7cc736ba334aefb55484baeefeb76 (patch)
treef43de86242f50c2af21bd8eb010a07988116a52a
parentaae9a918b68dc4f9a7b4fb9abf1bb4d26673109d (diff)
downloadfreeipa-5f5a3b29dba7cc736ba334aefb55484baeefeb76.tar.gz
freeipa-5f5a3b29dba7cc736ba334aefb55484baeefeb76.tar.xz
freeipa-5f5a3b29dba7cc736ba334aefb55484baeefeb76.zip
httpinstance: make sure NSS database is backed up
The NSS database at /etc/httpd/alias is not properly initialized and backed up in CA-less replica promotion. This might cause the install to fail after previous install and uninstall. Make sure the NSS database is initialized and backed up even in CA-less replica promotion to fix the issue. https://pagure.io/freeipa/issue/4639 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
-rw-r--r--ipaserver/install/httpinstance.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py
index 3e4252cb1..079ea9260 100644
--- a/ipaserver/install/httpinstance.py
+++ b/ipaserver/install/httpinstance.py
@@ -375,10 +375,11 @@ class HTTPInstance(service.Service):
return False
def __setup_ssl(self):
+ truncate = not self.promote or not self.ca_is_configured
db = certs.CertDB(self.realm, nssdir=paths.HTTPD_ALIAS_DIR,
subject_base=self.subject_base, user="root",
group=constants.HTTPD_GROUP,
- truncate=(not self.promote))
+ truncate=truncate)
self.disable_system_trust()
if self.pkcs12_info:
if self.ca_is_configured: