pgreco / rpms / ipa

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

Blame SOURCES/0180-server-certinstall-update-KDC-master-entry.patch

ac7d03
From 82af886e17905b8bdaadf8fc2b8214ad85a94470 Mon Sep 17 00:00:00 2001
ac7d03
From: Jan Cholasta <jcholast@redhat.com>
ac7d03
Date: Mon, 5 Jun 2017 12:35:52 +0000
ac7d03
Subject: [PATCH] server certinstall: update KDC master entry
ac7d03
ac7d03
After the KDC certificate is installed, add the PKINIT enabled flag to the
ac7d03
KDC master entry.
ac7d03
ac7d03
https://pagure.io/freeipa/issue/7000
ac7d03
ac7d03
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
ac7d03
---
ac7d03
 ipaserver/install/ipa_server_certinstall.py | 9 ++++++++-
ac7d03
 1 file changed, 8 insertions(+), 1 deletion(-)
ac7d03
ac7d03
diff --git a/ipaserver/install/ipa_server_certinstall.py b/ipaserver/install/ipa_server_certinstall.py
ac7d03
index a14a84f188c62170c8ac11f823ebba60609e4cc7..9c8f6e81a802e1a87bab1fd15f729e10676fe3a3 100644
ac7d03
--- a/ipaserver/install/ipa_server_certinstall.py
ac7d03
+++ b/ipaserver/install/ipa_server_certinstall.py
ac7d03
@@ -34,7 +34,7 @@ from ipapython.certdb import (get_ca_nickname,
ac7d03
                               verify_kdc_cert_validity)
ac7d03
 from ipapython.dn import DN
ac7d03
 from ipalib import api, errors
ac7d03
-from ipaserver.install import certs, dsinstance, installutils
ac7d03
+from ipaserver.install import certs, dsinstance, installutils, krbinstance
ac7d03
 
ac7d03
 
ac7d03
 class ServerCertInstall(admintool.AdminTool):
ac7d03
@@ -223,6 +223,13 @@ class ServerCertInstall(admintool.AdminTool):
ac7d03
         except RuntimeError as e:
ac7d03
             raise admintool.ScriptError(str(e))
ac7d03
 
ac7d03
+        krb = krbinstance.KrbInstance()
ac7d03
+        krb.init_info(
ac7d03
+            realm_name=api.env.realm,
ac7d03
+            host_name=api.env.host,
ac7d03
+        )
ac7d03
+        krb.pkinit_enable()
ac7d03
+
ac7d03
     def check_chain(self, pkcs12_filename, pkcs12_pin, nssdb):
ac7d03
         # create a temp nssdb
ac7d03
         with NSSDatabase() as tempnssdb:
ac7d03
-- 
ac7d03
2.9.4
ac7d03