Hi Patrick, On Mon, 2011-08-15 at 11:14 -0500, Patrick Riehecky wrote: > I'm trying to modify my site's krb5.conf[1] with Augeas, but am unable > to get information out of the lense. I'm using the krb5 lense from > 0.9.0 with everything else from 0.7.2. I wish I had errors to report > but I don't.
Version 0.7.3 of Augeas contained a bug that would drop error messages; that error is also in 0.7.2 versions of Augeas on RHEL (because of backporting) Ideally, you could just grab and build 0.9.0 for working on this krb5 issue. Attached is a patch that addresses one of the issues the curent Krb5 lens has with your krb5.conf: that some values have spaces, i.e. are lists of values. The change just gobbles everything up into one tree node. The lens also chokes on the realm CERN.CH, specifically on v4_name_convert; to fix that, you'd have to make v4_name_convert in lens libdefaults a toplevel lens in krb5.aug and also use it in the realms lens. I'll try and look into that later this week - feel free to beat me to it though. David
>From 2983606e6e7bcfac0e93ae7910c5dccc367367ed Mon Sep 17 00:00:00 2001 From: David Lutterkort <[email protected]> Date: Tue, 16 Aug 2011 16:12:24 -0700 Subject: [PATCH] krb5: allow spaces in values --- lenses/krb5.aug | 2 +- lenses/tests/test_krb5.aug | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletions(-) diff --git a/lenses/krb5.aug b/lenses/krb5.aug index b417a8e..1bcb4c2 100644 --- a/lenses/krb5.aug +++ b/lenses/krb5.aug @@ -24,7 +24,7 @@ let realm_re = /[A-Z][.a-zA-Z0-9-]*/ let app_re = /[a-z][a-zA-Z0-9_]*/ let name_re = /[.a-zA-Z0-9_-]+/ -let value = store /[^;# \t\n{}]+/ +let value = store /[^;# \t\n{}]|[^;# \t\n{}][^#\n]*[^;# \t\n{}]/ let entry (kw:regexp) (sep:lens) (comment:lens) = [ indent . key kw . sep . value . (comment|eol) ] | comment diff --git a/lenses/tests/test_krb5.aug b/lenses/tests/test_krb5.aug index d2a4fef..ccbf068 100644 --- a/lenses/tests/test_krb5.aug +++ b/lenses/tests/test_krb5.aug @@ -890,3 +890,26 @@ test Krb5.libdefaults get "[libdefaults] { "v4_name_convert" { "host" { "rcmd" = "host" } { "ftp" = "ftp" } } { "plain" { "something" = "something-else" } } } } + +(* multiple enctypes in libdefaults *) +test Krb5.libdefaults get "[libdefaults] + default_tgs_enctypes = des-cbc-crc des3-cbc-sha1 + default_tkt_enctypes = des-cbc-crc des3-cbc-sha1\n" = + { "libdefaults" + { "default_tgs_enctypes" = "des-cbc-crc des3-cbc-sha1" } + { "default_tkt_enctypes" = "des-cbc-crc des3-cbc-sha1" } } + +test Krb5.realms get "[realms] + CERN.CH = { + kdc = afsdb2.cern.ch + kdc = afsdb3.cern.ch + kdc = afsdb1.cern.ch + default_domain = cern.ch + kpasswd_server = afskrb5m.cern.ch + admin_server = afskrb5m.cern.ch + v4_name_convert = { + host = { + rcmd = host + } + } + }\n" = ? -- 1.7.6
_______________________________________________ augeas-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/augeas-devel
