Skip to content

Commit

Permalink
Merge pull request #27 from millerthomasj/umask5.4.4
Browse files Browse the repository at this point in the history
Update umask checks for Centos7 and Amazon Linux.
  • Loading branch information
rarenerd authored Apr 13, 2018
2 parents e5f6d89 + 659e808 commit e9b4698
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions controls/5_4_user_accounts_and_environments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,15 @@
tag cis: 'distribution-independent-linux:5.4.4'
tag level: 1

%w(bash.bashrc profile).each do |f|
%w(bash.bashrc profile bashrc).each do |f|
describe file("/etc/#{f}") do
its(:content) { should_not match(/^umask [01234567](0[7654321]|[7654321][654321])\s*(?:#.*)?$/) }
end
end

describe.one do
%w(bash.bashrc profile).each do |f|
%w(bash.bashrc profile bashrc).each do |f|
next unless file("/etc/#{f}").file?
describe file("/etc/#{f}") do
its(:content) { should match(/^umask [01234567][2367]7\s*(?:#.*)?$/) }
end
Expand Down

0 comments on commit e9b4698

Please sign in to comment.