URL: https://github.com/freeipa/freeipa/pull/623
Author: HonzaCholasta
 Title: #623: client install: do not assume /etc/krb5.conf.d exists
Action: opened

PR body:
"""
Add `includedir /etc/krb5.conf.d` to /etc/krb5.conf only if
/etc/krb5.conf.d exists.

This fixes client install on platforms which do not have /etc/krb5.conf.d.

https://pagure.io/freeipa/issue/6589
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/623/head:pr623
git checkout pr623
From fcb9f68865620af4dcad20c685eb17e168c54cb0 Mon Sep 17 00:00:00 2001
From: Jan Cholasta <jchol...@redhat.com>
Date: Mon, 20 Mar 2017 06:56:53 +0000
Subject: [PATCH] client install: do not assume /etc/krb5.conf.d exists

Add `includedir /etc/krb5.conf.d` to /etc/krb5.conf only if
/etc/krb5.conf.d exists.

This fixes client install on platforms which do not have /etc/krb5.conf.d.

https://pagure.io/freeipa/issue/6589
---
 ipaclient/install/client.py | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/ipaclient/install/client.py b/ipaclient/install/client.py
index 549c9b8..95c6cf7 100644
--- a/ipaclient/install/client.py
+++ b/ipaclient/install/client.py
@@ -641,14 +641,18 @@ def configure_krb5_conf(
             'value': 'File modified by ipa-client-install'
         },
         krbconf.emptyLine(),
-        {
-            'name': 'includedir',
-            'type': 'option',
-            'value': paths.COMMON_KRB5_CONF_DIR,
-            'delim': ' '
-        }
     ]
 
+    if os.path.exists(paths.COMMON_KRB5_CONF_DIR):
+        opts += [
+            {
+                'name': 'includedir',
+                'type': 'option',
+                'value': paths.COMMON_KRB5_CONF_DIR,
+                'delim': ' '
+            }
+        ]
+
     # SSSD include dir
     if configure_sssd:
         opts.extend([
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Reply via email to