[5.3.2, 5.3.3.3.1, 5.3.3.3.x] fix pam_pwhistory file generation#147
Merged
uk-bolly merged 1 commit intoansible-lockdown:develfrom Feb 23, 2026
Merged
[5.3.2, 5.3.3.3.1, 5.3.3.3.x] fix pam_pwhistory file generation#147uk-bolly merged 1 commit intoansible-lockdown:develfrom
uk-bolly merged 1 commit intoansible-lockdown:develfrom
Conversation
Signed-off-by: Kondratev Alexander <info@bykvaadm.ru>
03b2962 to
caf8d38
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
5.3.2
remove duplicates in jinja template. Audit regexp from ubuntu cis won't work ever because of this. (5.3.3.1)
5.3.3.3.1, 5.3.3.3.2, 5.3.3.3.3
fix when condition: if grep fails (no history string in pam config) - stdout will be empty and we won't check if right string goes in config file.
P.S.:
if ansible fails before running to the end we will never update pam, because all conditional checks with /usr/share will pass and never run handlers. This is true to all this kind of tasks.
P.P.S.:
something to think about: we put this file in ansible at 5.3.2 and full rewrite it. then in 5.3.3.3.1 we check line. maybe we should not do this at all? we believe that the center of truth is in 5.3.2. and notification of pam update is also there. why checking string second time in 5.3.3.3.1 (we don't check the value of pw_history, in fact we double-check ourselves that jinja template is correct)