Puppet Class: cis_security_hardening::rules::home_noexec
- Defined in:
- manifests/rules/home_noexec.pp
Summary
Ensure file systems that contain user home directories are mounted with the "noexec" optionOverview
The operating system must prevent code from being executed on file systems that contain user home directories.
Rationale: The “noexec” mount option causes the system not to execute binary files. This option must be used for mounting any file system not containing approved binary files, as they may be incompatible. Executing files from untrusted file systems increases the opportunity for unprivileged users to attain unauthorized administrative access.
20 21 22 23 24 25 26 27 28 29 |
# File 'manifests/rules/home_noexec.pp', line 20
class cis_security_hardening::rules::home_noexec (
Boolean $enforce = false,
) {
if ($enforce) and cis_security_hardening::hash_key($facts['mountpoints'], '/home') {
cis_security_hardening::set_mount_options { '/home-noexec':
mountpoint => '/home',
mountoptions => 'noexec',
}
}
}
|