Puppet Class: security_baseline::rules::common::sec_cups
- Defined in:
- manifests/rules/common/sec_cups.pp
Summary
Ensure CUPS is not enabled (Scored)Overview
The Common Unix Print System (CUPS) provides the ability to print to both local and network printers. A system running CUPS can also accept print jobs from remote systems and print them to local printers. It also provides a web based remote administration capability.
Rationale: If the system does not need to print jobs or accept print jobs from other systems, it is recommended that CUPS be disabled to reduce the potential attack surface.
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'manifests/rules/common/sec_cups.pp', line 29
class security_baseline::rules::common::sec_cups (
Boolean $enforce = true,
String $message = '',
String $log_level = ''
) {
if($enforce) {
ensure_resource('service', ['cups'], {
ensure => 'stopped',
enable => false,
})
} else {
if($facts['security_baseline']['services_enabled']['srv_cups'] == 'enabled') {
echo { 'cups':
message => $message,
loglevel => $log_level,
withpath => false,
}
}
}
}
|