Commit deb2fe6c authored by Jonathan Gazeley's avatar Jonathan Gazeley
Browse files

Winbind support is now an optional component that can be enabled

parent a2bbfb76
Loading
Loading
Loading
Loading
+9 −7
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ of the global settings to increase flexibility. Patches are welcome.
 * `utils_support` Install FreeRADIUS utils. Default: `false`
 * `ldap_support` Install support for LDAP. Default: `false`
 * `wpa_supplicant`. Install wpa_supplicant utility. Default: `false`
 * `winbind_support`. Add the radius user to the winbind privileged group. You must install winbind separately. Default: `false`.

```puppet
class { 'freeradius':
@@ -60,6 +61,7 @@ class { 'freeradius':
  perl_support    => true,
  utils_support   => true,
  wpa_supplicant  => true,
  winbind_support => true,
}
```

+14 −13
Original line number Diff line number Diff line
@@ -8,10 +8,9 @@ class freeradius (
  $utils_support   = false,
  $ldap_support    = false,
  $wpa_supplicant  = false,
  $winbind_support = false,
) inherits freeradius::params {

  include samba

  file { 'radiusd.conf':
    name    => "${fr_basepath}/radiusd.conf",
    mode    => '0640',
@@ -122,7 +121,6 @@ class freeradius (
      File['radiusd.conf'],
      User['radiusd'],
      Package[$fr_package],
      Service['winbind']
    ],
    enable     => true,
    hasstatus  => true,
@@ -134,8 +132,11 @@ class freeradius (
    ensure  => present,
    uid     => '95',
    gid     => 'radiusd',
    groups  => 'wbpriv',
    require => Package[$fr_package, 'samba-winbind'],
    groups  => $winbind_support ? {
      true    => $fr_wbpriv_user,
      default => undef,
    },
    require => Package[$fr_package],
  }

  # Install a few modules required on all FR installations
+7 −0
Original line number Diff line number Diff line
@@ -49,4 +49,11 @@ class freeradius::params {
    'Debian' => 'freerad',
    default  => 'radiusd',
  }

  # Privileged winbind user
  $fr_wbpriv_user = $::osfamily ? {
    'RedHat' => 'wbpriv',
    'Debian' => 'winbindd_priv',
    default  => 'wbpriv',
  }
}