aboutsummaryrefslogtreecommitdiffstats
path: root/modules/openssh/manifests
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-07-06 15:14:38 +0000
committerNicolas Vigier <boklm@mageia.org>2013-07-06 15:14:38 +0000
commitf883d4afa9d46a4091bd1cd99fd0677643c779a5 (patch)
tree82fdd0c048274199ee241288825ed4d693462de3 /modules/openssh/manifests
parent93e656447c3f5201ee30e6e17a1841c65acc5269 (diff)
downloadpuppet-f883d4afa9d46a4091bd1cd99fd0677643c779a5.tar
puppet-f883d4afa9d46a4091bd1cd99fd0677643c779a5.tar.gz
puppet-f883d4afa9d46a4091bd1cd99fd0677643c779a5.tar.bz2
puppet-f883d4afa9d46a4091bd1cd99fd0677643c779a5.tar.xz
puppet-f883d4afa9d46a4091bd1cd99fd0677643c779a5.zip
openssh: switch to standard path for authorized_keys file
Diffstat (limited to 'modules/openssh/manifests')
-rw-r--r--modules/openssh/manifests/pubkeys_directory.pp17
-rw-r--r--modules/openssh/manifests/ssh_keys_from_ldap.pp15
-rw-r--r--modules/openssh/manifests/symlink_user.pp19
3 files changed, 1 insertions, 50 deletions
diff --git a/modules/openssh/manifests/pubkeys_directory.pp b/modules/openssh/manifests/pubkeys_directory.pp
deleted file mode 100644
index cbcaeb88..00000000
--- a/modules/openssh/manifests/pubkeys_directory.pp
+++ /dev/null
@@ -1,17 +0,0 @@
-class openssh::pubkeys_directory {
- $pubkeys_directory = '/var/lib/pubkeys'
- file { $pubkeys_directory:
- ensure => directory,
- }
-
- file { "$pubkeys_directory/root":
- ensure => directory,
- mode => '0700',
- }
-
- file { "$pubkeys_directory/root/authorized_keys":
- ensure => link,
- target => '/root/.ssh/authorized_keys',
- mode => '0700',
- }
-}
diff --git a/modules/openssh/manifests/ssh_keys_from_ldap.pp b/modules/openssh/manifests/ssh_keys_from_ldap.pp
index 4615647c..d29cc7ae 100644
--- a/modules/openssh/manifests/ssh_keys_from_ldap.pp
+++ b/modules/openssh/manifests/ssh_keys_from_ldap.pp
@@ -1,19 +1,6 @@
-class openssh::ssh_keys_from_ldap($symlink_users = [],
- $config = '') inherits server {
- # root account authorized_keys will be symlinked
- # if you want to add symlink on other accounts, use $symlink_users parameter
-
- File ['/etc/ssh/sshd_config'] {
- content => template('openssh/sshd_config','openssh/sshd_config_ldap')
- }
-
+class openssh::ssh_keys_from_ldap($config = '') inherits server {
package { 'python-ldap': }
- include openssh::pubkeys_directory
- $pubkeys_directory = $openssh::pubkeys_directory::pubkeys_directory
-
- symlink_user { $symlink_users: }
-
$ldap_pwfile = '/etc/ldap.secret'
$ldap_servers = get_ldap_servers()
mga_common::local_script { 'ldap-sshkey2file.py':
diff --git a/modules/openssh/manifests/symlink_user.pp b/modules/openssh/manifests/symlink_user.pp
deleted file mode 100644
index f2e107b1..00000000
--- a/modules/openssh/manifests/symlink_user.pp
+++ /dev/null
@@ -1,19 +0,0 @@
-define openssh::symlink_user() {
- include openssh::pubkeys_directory
- $pubkeys_directory = $openssh::pubkeys_directory::pubkeys_directory
- file { "$pubkeys_directory/$name":
- ensure => directory,
- owner => $name,
- group => $name,
- mode => '0700',
- }
-
- file { "$pubkeys_directory/$name/authorized_keys":
- # FIXME : fragile approximation for $HOME
- ensure => link,
- target => "/home/$name/.ssh/authorized_keys",
- mode => '0700',
- }
-}
-
-