[augeas-devel] lens for /etc/ssh/ssh_config

Francis Giraldeau francis.giraldeau at usherbrooke.ca
Wed Aug 24 14:24:00 UTC 2011


On Wed, 2011-08-24 at 12:39 +0200, Jiri Suchomel wrote:
> Hi!
> 
> I've tried to create simple lens for /etc/ssh/ssh_config
> 
> Could  you check if it does not contain some obvious errors, and potentially 
> add it to your standard set of lenses?

This lens is definitely interesting.

The array_entry is using a global counter k, meaning the options are
getting a unique number. The addition of a counter lens reset the
counter for each send_env.

    let array_entry (k:string) =
	[ key k . counter k . [ spc . seq k . value_to_spc]* . eol ]

I don't know why it has been done like this in the sshd_config lens.
Also, those lenses doesn't support case-insensitive directives, but the
configuration is accepting it. Should we support it? No users seems
complaining ;)

The Ciphers directive doesn't split all elements from the list, it would
be good to add this:

  Ciphers 1-2,3-4 -> { "Ciphers" { "1" = "1-2" } { "2" = "3-4" } }

Also, ProxyCommand and RemoteForward directives makes the lens fail:

  ProxyCommand /usr/bin/nc -X connect -x 192.0.2.0:8080 %h %p
  RemoteForward 1.2.3.4:12 3.4.5.6:43

With those additions, I think it would be complete. 

Thanks!

Francis




More information about the augeas-devel mailing list