aboutsummaryrefslogtreecommitdiffstats
path: root/modules/pam
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2012-12-11 18:56:35 +0000
committerNicolas Vigier <boklm@mageia.org>2012-12-11 18:56:35 +0000
commit6764f193e4b954c549ee33f8498b63684ca49eb2 (patch)
tree9dde45a2cc3b351fbd974a3bc810c09ada7803cc /modules/pam
parent065281dae19f263173906fbd4d2b5f9a77854e1e (diff)
downloadpuppet-6764f193e4b954c549ee33f8498b63684ca49eb2.tar
puppet-6764f193e4b954c549ee33f8498b63684ca49eb2.tar.gz
puppet-6764f193e4b954c549ee33f8498b63684ca49eb2.tar.bz2
puppet-6764f193e4b954c549ee33f8498b63684ca49eb2.tar.xz
puppet-6764f193e4b954c549ee33f8498b63684ca49eb2.zip
Make pam::multiple_ldap_access a class instead of a define
pam::multiple_ldap_access can only be included once. If it is included multiple time, the value of the variable $access_classes used in templates/system-auth is random. As it can only be included once, it should be a parameterized class and not a defined resource.
Diffstat (limited to 'modules/pam')
-rw-r--r--modules/pam/manifests/base.pp1
-rw-r--r--modules/pam/manifests/multiple_ldap_access.pp2
2 files changed, 2 insertions, 1 deletions
diff --git a/modules/pam/manifests/base.pp b/modules/pam/manifests/base.pp
index df913101..d4143b78 100644
--- a/modules/pam/manifests/base.pp
+++ b/modules/pam/manifests/base.pp
@@ -1,4 +1,5 @@
class pam::base {
+ include pam::multiple_ldap_access
package { ['pam_ldap','nss_ldap','nscd']: }
service { 'nscd':
diff --git a/modules/pam/manifests/multiple_ldap_access.pp b/modules/pam/manifests/multiple_ldap_access.pp
index ecda7018..d287dfb7 100644
--- a/modules/pam/manifests/multiple_ldap_access.pp
+++ b/modules/pam/manifests/multiple_ldap_access.pp
@@ -1,4 +1,4 @@
-define pam::multiple_ldap_access($access_classes, $restricted_shell = false) {
+class pam::multiple_ldap_access($access_classes, $restricted_shell = false) {
if $restricted_shell {
include restrictshell
}