Skip to content

Commit

Permalink
Merge pull request #59 from ansible-lockdown/issue_57
Browse files Browse the repository at this point in the history
Issue 57
  • Loading branch information
uk-bolly committed Jul 13, 2022
2 parents 79891b0 + b6fbb19 commit a35139d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Binary file removed .DS_Store
Binary file not shown.
5 changes: 5 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,11 @@ ubtu20cis_pass:
warn_age: 7
inactive: 30

# Control 5.5.4
# ubtu120cis_bash_umask is the umask to set in the /etc/bash.bashrc and /etc/profile.
# The value needs to be 027 or more restrictive to comply with CIS standards
ubtu20cis_bash_umask: '027'

# Control 5.5.5
# Session timeout setting file (TMOUT setting can be set in multiple files)
# Timeout value is in seconds. Set value to 900 seconds or less
Expand Down
6 changes: 3 additions & 3 deletions tasks/section_5/cis_5.5.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@
when: ubtu20cis_5_5_4_umask_pam_status.stdout | length == 0

- name: "AUTOMATED | 5.5.4 | PATCH | Ensure default user umask is 027 or more restrictive"
replace:
lineinfile:
path: "{{ item }}"
regexp: '(?i)^((?!#)umask)\s+0[0,2,5][0,2,5]'
replace: '\1 027'
regexp: '^umask '
line: "umask {{ ubtu20cis_bash_umask }}"
with_items:
- /etc/bash.bashrc
- /etc/profile
Expand Down

0 comments on commit a35139d

Please sign in to comment.