diff --git a/README.md b/README.md index 39e90cd..11bb4f6 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,7 @@ Available parameters are: * group * shadow * hosts +* initgroups * bootparams * aliases * automount diff --git a/REFERENCE.md b/REFERENCE.md index 2878dcb..9d016c9 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -119,6 +119,14 @@ Host names and numbers, used by gethostbyname() and related functions. Default value: $nsswitch::params::hosts_default +##### `initgroups` + +Data type: `Optional[Variant[String, Array]]` + +Supplementary group access list, used by getgrouplist(3) function. + +Default value: $nsswitch::params::initgroups + ##### `netgroup` Data type: `Optional[Variant[String, Array]]` diff --git a/manifests/init.pp b/manifests/init.pp index 2a8fcb8..102d1b1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -45,6 +45,11 @@ # @param hosts # Host names and numbers, used by gethostbyname() and related functions. # +# @param initgroups +# +# Supplementary group access list, used by getgrouplist(3) function. +# *Optional* (defaults to $nsswitch::params::initgroups) +# # @param netgroup # Network-wide list of hosts and users, used for access rules. # @@ -92,6 +97,7 @@ Variant[String] $file_perms = '0644', Optional[Variant[String, Array]] $group = $nsswitch::params::group_default, Optional[Variant[String, Array]] $hosts = $nsswitch::params::hosts_default, + Optional[Variant[String, Array]] $initgroups = $nsswitch::params::initgroups, Optional[Variant[String, Array]] $netgroup = $nsswitch::params::netgroup_default, Optional[Variant[String, Array]] $netmasks = $nsswitch::params::netmasks_default, Optional[Variant[String, Array]] $networks = $nsswitch::params::networks_default, diff --git a/manifests/params.pp b/manifests/params.pp index ce19084..dacda2c 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -36,6 +36,7 @@ $rpc_default = ['files'] $shells_default = undef $sudoers_default = undef + $initgroups = undef } 'Fedora': { $aliases_default = ['files','nisplus'] @@ -59,6 +60,7 @@ $shadow_default = ['files'] $shells_default = undef $sudoers_default = undef + $initgroups = undef } /Ubuntu|Debian/: { $aliases_default = undef @@ -80,6 +82,7 @@ $shadow_default = ['compat'] $shells_default = undef $sudoers_default = undef + $initgroups = undef } 'SLES': { $aliases_default = ['files'] @@ -101,6 +104,7 @@ $shadow_default = undef $shells_default = undef $sudoers_default = undef + $initgroups = undef } 'Solaris': { $aliases_default = ['files','nisplus'] @@ -122,6 +126,7 @@ $shadow_default = undef $shells_default = undef $sudoers_default = undef + $initgroups = undef } 'Gentoo': { $aliases_default = ['files'] @@ -143,6 +148,7 @@ $shadow_default = ['compat'] $shells_default = undef $sudoers_default = undef + $initgroups = undef } 'FreeBSD': { $aliases_default = undef @@ -164,6 +170,7 @@ $shadow_default = undef $shells_default = ['files'] $sudoers_default = undef + $initgroups = undef } 'LinuxMint': { $file_group = 'root' @@ -185,6 +192,7 @@ $shadow_default = ['compat'] $shells_default = undef $sudoers_default = undef + $initgroups = undef } 'Archlinux': { $file_group = 'root' diff --git a/templates/nsswitch.conf.epp b/templates/nsswitch.conf.epp index f0d13fd..533b68b 100644 --- a/templates/nsswitch.conf.epp +++ b/templates/nsswitch.conf.epp @@ -54,3 +54,6 @@ aliases: <%= [*$::nsswitch::aliases].join(" ") %> <% if $::nsswitch::shells { -%> shells: <%= [*$::nsswitch::shells].join(" ") %> <% } -%> +<% if $::nsswitch::initgroups { -%> +initgroups: <%= [*$::nsswitch::initgroups].join(" ") %> +<% } -%>