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