<div dir="ltr"><br><br><div class="gmail_quote">2008/8/1 Dominique Dumont <span dir="ltr"><<a href="mailto:dominique.dumont@hp.com">dominique.dumont@hp.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hello<br>
<br>
I'm still testing Augeas with Config::Model [1] by loading sshd_config<br>
in Config::Model through Config::Model::OpenSsh [2] and Augeas [3].<br>
<br>
This currently fails because the semantic of sshd_config Subsystem is<br>
interpreted differently on Augeas and in Config::Model::OpenSsh (the<br>
model of sshd_config)<br>
<br>
Augeas considers Subsystem to be a simple value (a leaf in<br>
config-model terminology):<br>
<br>
/files/etc/ssh/sshd_config/Subsystem = "sftp /usr/lib/openssh/sftp-server"<br>
<br>
Where as, from the sshd_config man page and ssh man page, I<br>
interpreted this as a hash:<br>
<br>
man sshd_config:<br>
<br>
Subsystem Configures an external subsystem (e.g. file transfer<br>
             daemon).  Arguments should be a subsystem name and a<br>
             command (with optional arguments) to execute upon<br>
             subsystem request. The command sftp-server(8) implements<br>
             the "sftp" file transfer subsystem. Alternately the<br>
             name "internal-sftp" implements an in-process "sftp"<br>
             server.  This may simplify configurations using<br>
             ChrootDirectory to force a different filesystem root on<br>
             clients. By default no subsystems are defined.  Note that<br>
             this option applies to protocol version 2 only.<br>
<br>
<br>
man ssh:<br>
<br>
   -s   May be used to request invocation of a subsystem on the remote<br>
        system.  Subsystems are a feature of the SSH2 protocol which<br>
        facili‐tate the use of SSH as a secure transport for other<br>
        applications (eg. sftp(1)).  The subsystem is specified as the<br>
        remote command.<br>
<br>
<br>
So, it looks like more than one subsystem can be configured in<br>
sshd_config so the lens should load it as an array.<br>
</blockquote><div><br><br>It is an array as it is from what I understand. If you have several Subsystem entries, they will be represented as :<br>/files/etc/ssh/sshd_config/Subsystem[1] = "sftp /usr/lib/openssh/sftp-server"<br>
/files/etc/ssh/sshd_config/Subsystem[2] = "internal-sftp /another/command"<br><br>Although I think it could well be split into :<br><br>{ "Subsystem"<br>    { "name" = "sftp" }<br>    { "command" = "/usr/lib/openssh/sftp-server" } }<br>
{ "Subsystem"<br>    { "name" = "internal-sftp" }<br>    { "command" = "/another/command" } }<br><br><br>but that's another problem ;)<br><br><br><br>Raphaël<br><br></div>
</div><br></div>