483b06
From aa123edfdab1836c0915bb75f3bf82e46083b17f Mon Sep 17 00:00:00 2001
483b06
From: Martin Babinsky <mbabinsk@redhat.com>
483b06
Date: Wed, 28 Jun 2017 09:49:18 +0200
483b06
Subject: [PATCH] smart-card-advises: ensure that krb5-pkinit is installed on
483b06
 client
483b06
483b06
This library is a prerequisite for successful Smart Card authentication
483b06
on the client. The client-side advise should make sure this dependency
483b06
is present.
483b06
483b06
https://pagure.io/freeipa/issue/7036
483b06
483b06
Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com>
483b06
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
483b06
---
483b06
 ipaserver/advise/plugins/smart_card_auth.py | 7 +++++++
483b06
 1 file changed, 7 insertions(+)
483b06
483b06
diff --git a/ipaserver/advise/plugins/smart_card_auth.py b/ipaserver/advise/plugins/smart_card_auth.py
483b06
index 5134db535e8f10e8cf850dbf0696b679aacec4f5..fb328f29ca5051ad52c9c5e0000021ad5e8b94e8 100644
483b06
--- a/ipaserver/advise/plugins/smart_card_auth.py
483b06
+++ b/ipaserver/advise/plugins/smart_card_auth.py
483b06
@@ -256,6 +256,7 @@ class config_client_for_smart_card_auth(common_smart_card_auth_config):
483b06
         self.check_ccache_not_empty()
483b06
         self.check_and_remove_pam_pkcs11()
483b06
         self.install_opensc_and_dconf_packages()
483b06
+        self.install_krb5_client_dependencies()
483b06
         self.start_enable_smartcard_daemon()
483b06
         self.add_pkcs11_module_to_systemwide_db()
483b06
         self.upload_smartcard_ca_certificates_to_systemwide_db()
483b06
@@ -281,6 +282,12 @@ class config_client_for_smart_card_auth(common_smart_card_auth_config):
483b06
             ['Could not install OpenSC package']
483b06
         )
483b06
 
483b06
+    def install_krb5_client_dependencies(self):
483b06
+        self.log.exit_on_failed_command(
483b06
+            'yum install -y krb5-pkinit-openssl',
483b06
+            ['Failed to install Kerberos client PKINIT extensions.']
483b06
+        )
483b06
+
483b06
     def start_enable_smartcard_daemon(self):
483b06
         self.log.command(
483b06
             'systemctl start {service} {socket} '
483b06
-- 
483b06
2.9.4
483b06