Blame SOURCES/0014-Fix-430-support-Krb5-include-dir.patch

84dac3
From 430f0210d36d3abf2bfbe2a336f8f8d260ccc81b Mon Sep 17 00:00:00 2001
84dac3
From: "Jason A. Smith" <smithj4@bnl.gov>
84dac3
Date: Fri, 23 Dec 2016 03:19:24 -0500
84dac3
Subject: [PATCH] Fix #430 - support Krb5 include(dir)?
84dac3
84dac3
Updated the Krb5 lens to support the include(dir)? directives,
84dac3
with test case.
84dac3
---
84dac3
 lenses/krb5.aug            | 9 +++++++--
84dac3
 lenses/tests/test_krb5.aug | 9 +++++++++
84dac3
 2 files changed, 16 insertions(+), 2 deletions(-)
84dac3
84dac3
diff --git a/lenses/krb5.aug b/lenses/krb5.aug
84dac3
index 37778fd8..8936f3a0 100644
84dac3
--- a/lenses/krb5.aug
84dac3
+++ b/lenses/krb5.aug
84dac3
@@ -151,8 +151,13 @@ let kdc =
84dac3
 let pam =
84dac3
   simple_section "pam" name_re
84dac3
 
84dac3
-let lns = (comment|empty)* .
84dac3
+let includes = Build.key_value_line /include(dir)?/ Sep.space (store Rx.fspath)
84dac3
+
84dac3
+let lns = (comment|empty|includes)* .
84dac3
   (libdefaults|login|appdefaults|realms|domain_realm
84dac3
   |logging|capaths|dbdefaults|dbmodules|instance_mapping|kdc|pam)*
84dac3
 
84dac3
-let xfm = transform lns (incl "/etc/krb5.conf")
84dac3
+let filter = (incl "/etc/krb5.conf.d/*.conf")
84dac3
+           . (incl "/etc/krb5.conf")
84dac3
+
84dac3
+let xfm = transform lns filter
84dac3
diff --git a/lenses/tests/test_krb5.aug b/lenses/tests/test_krb5.aug
84dac3
index e17a659a..743bb375 100644
84dac3
--- a/lenses/tests/test_krb5.aug
84dac3
+++ b/lenses/tests/test_krb5.aug
84dac3
@@ -1020,3 +1020,12 @@ default_ccache_name = KEYRING:persistent:%{uid}\n" =
84dac3
   { "libdefaults"
84dac3
     {  }
84dac3
     { "default_ccache_name" = "KEYRING:persistent:%{uid}" } }
84dac3
+
84dac3
+(* Include(dir) test *)
84dac3
+let include_test = "include /etc/krb5.other_conf.d/other.conf
84dac3
+includedir /etc/krb5.conf.d/
84dac3
+"
84dac3
+
84dac3
+test Krb5.lns get include_test =
84dac3
+  { "include" = "/etc/krb5.other_conf.d/other.conf" }
84dac3
+  { "includedir" = "/etc/krb5.conf.d/" }
84dac3
-- 
c5f980
2.17.2
84dac3