An SELinux Context must be configured for the pam_faillock.so records directory
An XCCDF Rule
Description
The dir
configuration option in PAM pam_faillock.so module defines where the lockout
records is stored. The configured directory must have the correct SELinux context.
Rationale
Not having the correct SELinux context on the pam_faillock.so records directory may lead to unauthorized access to the directory.
- ID
- xccdf_org.ssgproject.content_rule_account_password_selinux_faillock_dir
- Severity
- Medium
- References
- Updated
Remediation - Shell Script
# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
#!/bin/bash
FAILLOCK_CONF_FILES="/etc/security/faillock.conf /etc/pam.d/system-auth /etc/pam.d/password-auth"