sshd_config lens patch (was: [config-model-users] [augeas-devel] Re: Semantic problem in augeas sshd lens ?)
David Lutterkort
lutter at redhat.com
Tue Sep 9 00:46:07 UTC 2008
On Mon, 2008-09-08 at 18:36 +0200, Dominique Dumont wrote:
> I'm fine with "Settings".
>
> Here's the first attempt for a better sshd lens.
Nice. I've committed this with a small change:
> diff -r 09dcb70fa724 lenses/sshd.aug
> --- a/lenses/sshd.aug Thu Aug 28 21:38:11 2008 -0700
> +++ b/lenses/sshd.aug Mon Sep 08 18:33:42 2008 +0200
> @@ -33,17 +41,21 @@
> ([ seq "macs" . Util.del_str "," . mac_value])* .
> eol ]
>
> + let match_cond =
> + [ label "Condition" . sep . [ key /[A-Za-z0-9]+/ . sep .
> + store /[^ \t\n]+/ ] ]
> +
> + let match_entry =
> + ( comment | other_entry )
> +
I changed this to
let match_entry = (comment | (Util.indent . other_entry))
so that indented lines in the Match block are processed properly - I
wonder if that should just be done for 'other_entry' in general.
> diff -r 09dcb70fa724 lenses/tests/test_sshd.aug
> --- a/lenses/tests/test_sshd.aug Thu Aug 28 21:38:11 2008 -0700
> +++ b/lenses/tests/test_sshd.aug Mon Sep 08 18:33:42 2008 +0200
> + let match_blocks = "X11Forwarding yes
> +Match User sarko Group pres.*
> +Banner /etc/bienvenue.txt
> +X11Forwarding no
> +Match User bush Group pres.* Host white.house.*
> +Banner /etc/welcome.txt
> +"
I indented the two lines after the first Match by a few spaces to make
sure that indented entries are processed properly.
David
More information about the augeas-devel
mailing list