[augeas-devel] Re: [config-model-users] Semantic problem in augeas sshd lens ?

Dominique Dumont dominique.dumont at hp.com
Fri Aug 1 12:24:58 UTC 2008


Raphaël Pinson <raphink at gmail.com> writes:

> It is an array as it is from what I understand. If you have several Subsystem entries,
> they will be represented as :
> /files/etc/ssh/sshd_config/Subsystem[1] = "sftp /usr/lib/openssh/sftp-server"
> /files/etc/ssh/sshd_config/Subsystem[2] = "internal-sftp /another/command"

Confirmed. This means that the path structure differs depending on the
number of elements of the array... :-/

And this notation is only valid for "leaf". As "higher" level arrays like
/etc/host/ use another notation even with only one element in the array:

augtool> print /files/etc/hosts
/files/etc/hosts
/files/etc/hosts/1
/files/etc/hosts/1/ipaddr = "127.0.0.1"
/files/etc/hosts/1/canonical = "localhost"
/files/etc/hosts/1/alias = "localhost"


> Although I think it could well be split into :
>
> { "Subsystem"
>     { "name" = "sftp" }
>     { "command" = "/usr/lib/openssh/sftp-server" } }
> { "Subsystem"
>     { "name" = "internal-sftp" }
>     { "command" = "/another/command" } }
>
> but that's another problem ;)

Actually, that's how I represent them in Config::Model::OpenSsh. I
think the end user will be more interested in configuring Subsystem by
names instead of dealing with "artificial" numbers. This gives a
structure like:

 Subsystem:sftp=/usr/lib/openssh/sftp-server
 Subsystem:internal-sftp=/usr/lib/openssh/sftp-server

and you can set them from command line using this subsystem name
oriented notation:

 $ config-edit -model Sshd  Subsystem:sftp=/usr/lib/openssh/sftp-server \
   Subsystem:internal-sftp=/usr/lib/openssh/sftp-server

But that's also another problem ;-)

-- 
Dominique Dumont 
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner




More information about the augeas-devel mailing list