[shared] Modify OVAL check for accounts_passwords_pam_faillock_deny rule #381
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix OVAL check for accounts_passwords_pam_faillock_deny rule to require exact setting from second example of
pam_faillock(8)manual page instead of to require incorrect setting listed at:[1] https://access.redhat.com/solutions/62949
Further details:
The current OVAL check implementation is based on configuration as documented at:
[1] https://access.redhat.com/solutions/62949
We have previously checked this setting / configuration with PAM faillock PAM module maintainer and according to their opinion the recommendation listed at [1] is wrong (it's not possible to extract just interesting bits from pam_faillock.so(8) manual page example and use them in arbitrary order [since order of PAM modules is also crucial for proper work of the setting]).
Following the suggestion from the developer to rather base on the second example from the
pam_faillock(8)manual page, we have implementedsharedc404af9 remediation script for this rule.See also details in #304 for explanation why currently used pam_faillock.so deny OVAL check is wrong & why it should be based on the second
pam_faillock.so(8)example instead.This patch / PR proposal is just completion / applying the same settings expectations to the underlying OVAL check too.
Testing report:
The proposed change has been tested on all three products (RHEL-6, RHEL-7 & Fedora 20) & works fine / works as expected.
Please review.
Thank you, Jan.
Version 2 - the second patch (iankko@45792dd) yet enhances the original proposal to include checks also for
preauth silentrows to be present in both/etc/pam.d/system-authand/etc/pam.d/password-authas suggested by Tomas Mraz (PAM package maintainer). This version also ensures the value ofdenyinpreauthrow matches the value of required failed logins (value ofvar_accounts_passwords_pam_faillock_denyvariable).Please review.
Thank you, Jan.