Puppet Class: cis_security_hardening::rules::jffs2
- Defined in:
- manifests/rules/jffs2.pp
Summary
Ensure mounting of jffs2 filesystems is disabledOverview
The jffs2 (journaling flash filesystem 2) filesystem type is a log-structured filesystem used in flash memory devices.
Rationale: Removing support for unneeded filesystem types reduces the local attack surface of the system. If this filesystem type is not needed, disable it.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'manifests/rules/jffs2.pp', line 20
class cis_security_hardening::rules::jffs2 (
Boolean $enforce = false,
) {
if $enforce {
case $facts['os']['name'].downcase() {
'ubuntu': {
if $facts['os']['release']['major'] >= '20' {
kmod::install { 'jffs2':
command => '/bin/false',
}
kmod::blacklist { 'jffs2': }
} else {
kmod::install { 'jffs2':
command => '/bin/true',
}
}
}
'centos': {
kmod::install { 'jffs2':
command => '/bin/false',
}
kmod::blacklist { 'jffs2': }
}
'debian': {
if $facts['os']['release']['major'] >= '12' {
kmod::install { 'jffs2':
command => '/bin/false',
}
kmod::blacklist { 'jffs2': }
} else {
kmod::install { 'jffs2':
command => '/bin/true',
}
}
}
default: {
kmod::install { 'jffs2':
command => '/bin/true',
}
}
}
}
}
|