mirror of
https://github.com/dev-sec/ansible-collection-hardening
synced 2024-11-10 09:14:18 +00:00
Prevent disabling of filesystems via whitelist
This commit is contained in:
parent
bf6cb73cd5
commit
d429d53c60
4 changed files with 7 additions and 2 deletions
|
@ -84,6 +84,8 @@ We disable the following filesystems, because they're most likely not used:
|
|||
* "udf"
|
||||
* "vfat"
|
||||
|
||||
To prevent some of the filesystems from being disabled, add them to the `os_filesystem_whitelist` variable.
|
||||
|
||||
## Example Playbook
|
||||
|
||||
- hosts: localhost
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
os_auth_allow_homeless: true
|
||||
os_security_suid_sgid_blacklist: ['/bin/umount']
|
||||
os_security_suid_sgid_whitelist: ['/usr/bin/rlogin']
|
||||
os_filesystem_whitelist: ['vfat']
|
||||
sysctl_config:
|
||||
net.ipv4.ip_forward: 0
|
||||
net.ipv6.conf.all.forwarding: 0
|
||||
|
|
|
@ -194,3 +194,5 @@ os_unused_filesystems:
|
|||
- "udf"
|
||||
- "vfat"
|
||||
|
||||
# whitelist for used filesystems
|
||||
os_filesystem_whitelist: []
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# {{ ansible_managed | comment }}
|
||||
{{ ansible_managed | comment }}
|
||||
|
||||
{% for fs in os_unused_filesystems %}
|
||||
{% for fs in os_unused_filesystems | difference(os_filesystem_whitelist) %}
|
||||
install {{fs}} /bin/true
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue