]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
Fix ssh_authorized_key
authorGabriel Filion <lelutin@gmail.com>
Thu, 20 Jan 2011 01:45:59 +0000 (20:45 -0500)
committerGabriel Filion <lelutin@gmail.com>
Mon, 31 Jan 2011 02:15:35 +0000 (21:15 -0500)
When one uses the $name to define the user that should receive an SSH
key, setting $user to a negative value, ssh_authorized_key currently
creates the authorized_keys file under /home/.ssh/authorized_keys

Fix this by changing ${user} to ${real_user} in the key's path.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
manifests/ssh_authorized_key.pp

index bf188d879e7fdf4de4af76df07109dd39789abd7..575b65421d616cd4b006b584d715405f7a8b04c2 100644 (file)
@@ -22,7 +22,7 @@ define sshd::ssh_authorized_key(
     undef,'': {
       case $real_user {
         'root': { $real_target = '/root/.ssh/authorized_keys' }
-        default: { $real_target = "/home/${user}/.ssh/authorized_keys" }
+        default: { $real_target = "/home/${real_user}/.ssh/authorized_keys" }
       }
     }
     default: {