Puppet Class: cis_benchmark::trusty64::logging

Defined in:
manifests/trusty64/logging.pp

Overview



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'manifests/trusty64/logging.pp', line 8

class cis_benchmark::trusty64::logging {
  ## local variables
  $log_dir    = '/var/log'
  $log_perm   = '640'

  ## local variables: stig items
  $cis_4_2_4  = $::cis_benchmark::cis_4_2_4

  ## CIS 4.2.4 Ensure permissions on all logfiles are configured (Scored)
  if ($cis_4_2_4) {
    exec { 'enforce-recursive-log-permission':
      command => "find ${log_dir} -type f -exec chmod ${log_perm} {} +",
      onlyif  => "find ${log_dir} -type f ! -perm ${log_perm} | grep -z .",
      path    => ['/bin', '/usr/bin'],
    }
  }
}