pgreco / rpms / ipa

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

Blame SOURCES/0217-smart-card-advises-ensure-that-krb5-pkinit-is-instal.patch

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