# set mmap_min_addr to 4096 to mitigate
# Linux NULL-pointer dereference exploits
site::sysctl { 'mmap_min_addr':
- key => 'vm.mmap_min_addr',
- value => '4096',
+ ensure => absent
}
site::sysctl { 'perf_event_paranoid':
key => 'kernel.perf_event_paranoid',
-define site::sysctl ($key, $value, $target=Linux, $ensure = present) {
+define site::sysctl ($key='', $value='', $target=Linux, $ensure = present) {
include site
case $ensure {
- present: {}
+ present: { if ($key == "" or $value == "") { fail ( "Need to provide key and value" )} }
absent: {}
default: { fail ( "Unknown ensure value: '$ensure'" ) }
}