[augeas-devel] adjustment to the krb5.aug lense

Dominic Cleal dcleal at redhat.com
Tue Aug 14 21:18:01 UTC 2012


On 14/08/12 21:56, Pat Riehecky wrote:
> On 08/14/2012 02:50 PM, Dominic Cleal wrote:
>> On 13/08/12 16:30, Pat Riehecky wrote:
>>> +let enctypes = /(permitted_enctypes|default_tgs_enctypes|default_tkt_enctypes)/
>> This line needs to be case insensitive I think, so add an "i" after the
>> end "/".  Reason below..
> I get weirdness with the 'i'  at the end:
> 
> # augparse tests/test_krb5.aug
> tests/test_krb5.aug:272.0-532.40:exception thrown in test
> tests/test_krb5.aug:272.5-.27:exception: expected ((())([ \t]*)(#)((([ 
> \t]*)([^ \t\n].*[^ \t\n]|[^ \t\n]))?)([ \t]*\n))|([ \t]*\n) at '###'
>      Lens: /usr/share/augeas/lenses/dist/krb5.aug:56.8-.20:
>      Error encountered at 1:0 (0 characters into string)
> <|=|###\n### This krb5.conf templ>
> 
>      Tree generated so far:
> 
> <snip>
> 
> I think this is something like what bug #147 describes......
> 
> as
> 
> let enctypes = 
> /([Pp][Ee][Rr][Mm][Ii][Tt][Tt][Ee][Dd]_[Ee][Nn][Cc][Tt][Yy][Pp][Ee][Ss]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt]_[Tt][Gg][Ss]_[Ee][Nn][Cc][Tt][Yy][Pp][Ee][Ss]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt]_[Tt][Kk][Tt]_[Ee][Nn][Cc][Tt][Yy][Pp][Ee][Ss])/
> 
> works just fine, but is more than a but ugly.  #147 seems like a hard 
> bug to solve, so I'm going to run with this for now.

It seems you can workaround it by removing the brackets inside the
regexp.  This doesn't blow up for me, but it did when brackets were
either side:

let enctypes =
/permitted_enctypes|default_tgs_enctypes|default_tkt_enctypes/i

I'll add this to the patch.

> The attached patch /should/ successfully implement the changes you've 
> suggested.

Looks spot on now - thanks for your contribution!

I'll wait until the lens compatibility discussion has settled before
merging (since it changes the tree), but it'll go in before the next
release.  There's a second Krb5 fix I've got here for #288 that'll apply
on top of your work.

Cheers,

-- 
Dominic Cleal
Red Hat Consulting
m: +44 (0)7817 878113




More information about the augeas-devel mailing list