[augeas-devel] sshd lens bugfix

David Lutterkort lutter at redhat.com
Tue Feb 2 18:30:46 UTC 2010


On Tue, 2010-02-02 at 10:58 +0100, Dominique Dumont wrote:
> Let's say this should parse into:
> 
>   { "Subsystem" { "foo" { "arg"="cmd"} { "arg" = "arg1" } { "arg" = "arg2" }}}
> 
> Anyway, let's see what this means from a user's point of view.
> 
> For augtool, this would means from:
> 
>   set /files/etc/ssh/sshd_config/Subsystem/foo="cmd arg1 arg2"
> 
> to something like:
> 
>   set /files/etc/ssh/sshd_config/Subsystem/foo/arg[0]="cmd"
>   set /files/etc/ssh/sshd_config/Subsystem/foo/arg[1]="arg1"
>   set /files/etc/ssh/sshd_config/Subsystem/foo/arg[2]="arg2"
> 
> which is somewhat more complex and split a single command into several 
> statements. Not to mention that augeas print command will yield less readable 
> dump since the subsystem command will be spreas on several lines, whereas the 
> user deal with a command on a single line.

Yes, that's always the tradeoff in writing lenses. Which one is 'right'
mostly depends on how granular people need these entries. In the first
form, it's easy to change the command as a whole; in the second, it's
easy to query and change individual parameters.

For example, the Grub.lns will split the kernel command line into
individual args, since people frequently want to interrogate and change
those individually. So, rephrasing my question: how important is that
granularity for Sshd ?

David





More information about the augeas-devel mailing list