summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-02-17 12:00:12 -0800
committerStephen Hemminger <stephen.hemminger@vyatta.com>2010-02-17 12:45:03 -0800
commit3577a4f420d71c8d1040341776a2039ce232b7dd (patch)
treeea129dcd4345cc9e793823d4ae52d1cfc48960d3 /lib
parent3ec0331cad6790982f9b1b2b4137eaadbc006b52 (diff)
downloadvyatta-cfg-quagga-3577a4f420d71c8d1040341776a2039ce232b7dd.tar.gz
vyatta-cfg-quagga-3577a4f420d71c8d1040341776a2039ce232b7dd.zip
Add support for options in keyfile
The sshd file format has optional options; copy them to a placeholder node and generate to authorized_keys Better error message when wrong number of arguments.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Vyatta/Login/User.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm
index e6632194..e08a65b9 100755
--- a/lib/Vyatta/Login/User.pm
+++ b/lib/Vyatta/Login/User.pm
@@ -88,8 +88,11 @@ sub _authorized_keys {
print {$auth} "# Automatically generated by Vyatta configuration\n";
print {$auth} "# Do not edit, all changes will be lost\n";
foreach my $name (@keys) {
+ my $options = $config->returnValue("$name options");
my $type = $config->returnValue("$name type");
my $key = $config->returnValue("$name key");
+
+ print {$auth} "$options " if $options;
print {$auth} "$type $key $name\n";
}