pgreco / rpms / ipa

Forked from forks/areguera/rpms/ipa 4 years ago
Clone

Blame SOURCES/0008-certs-do-not-implicitly-create-DS-pin.txt.patch

483b06
From 846b1c9b72f539cbe4b8d6e23de81e03b1afec9e Mon Sep 17 00:00:00 2001
483b06
From: Jan Cholasta <jcholast@redhat.com>
483b06
Date: Tue, 14 Mar 2017 09:32:17 +0100
483b06
Subject: [PATCH] certs: do not implicitly create DS pin.txt
483b06
483b06
Do not implicitly create DS pin.txt in `CertDB.init_from_pkcs12()`, create
483b06
it explicitly in `DSInstance.__enable_ssl()`.
483b06
483b06
This stops the file from being created in /etc/httpd/alias during classic
483b06
replica install.
483b06
483b06
https://pagure.io/freeipa/issue/4639
483b06
483b06
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
483b06
---
483b06
 ipaserver/install/certs.py      | 1 -
483b06
 ipaserver/install/dsinstance.py | 3 ++-
483b06
 2 files changed, 2 insertions(+), 2 deletions(-)
483b06
483b06
diff --git a/ipaserver/install/certs.py b/ipaserver/install/certs.py
483b06
index 63e7887c4e73a8346d4eb5d865ddc89c07247573..9f340b8678c55cffe2872df97c643c34857cfaa9 100644
483b06
--- a/ipaserver/install/certs.py
483b06
+++ b/ipaserver/install/certs.py
483b06
@@ -635,7 +635,6 @@ class CertDB(object):
483b06
         self.cacert_name = ca_names[-1]
483b06
         self.trust_root_cert(self.cacert_name, trust_flags)
483b06
 
483b06
-        self.create_pin_file()
483b06
         self.export_ca_cert(nickname, False)
483b06
 
483b06
     def publish_ca_cert(self, location):
483b06
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
483b06
index 91cc180e62b9532e716c07c493b359567b20c749..79dc90e92cac49a2b64ff6645f75dc3a8cbcc104 100644
483b06
--- a/ipaserver/install/dsinstance.py
483b06
+++ b/ipaserver/install/dsinstance.py
483b06
@@ -838,7 +838,8 @@ class DsInstance(service.Service):
483b06
                 certmonger.modify_ca_helper('IPA', prev_helper)
483b06
 
483b06
             self.dercert = dsdb.get_cert_from_db(self.nickname, pem=False)
483b06
-            dsdb.create_pin_file()
483b06
+
483b06
+        dsdb.create_pin_file()
483b06
 
483b06
         self.cacert_name = dsdb.cacert_name
483b06
 
483b06
-- 
483b06
2.12.1
483b06