Skip to content

Commit a04b289

Browse files
committed
Revert "motd may be configured under /etc/update-motd.d/"
This reverts commit 79d234c. Signed-off-by: Bryan Endres <[email protected]>
1 parent 8999ad4 commit a04b289

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

controls/1_7_warning_banners.rb

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -59,28 +59,17 @@
5959
end
6060

6161
control 'cis-dil-benchmark-1.7.1.4' do
62-
title 'Ensure permissions on /etc/motd and /etc/update-motd.d/* are configured'
63-
desc "The contents of the /etc/motd and /etc/update-motd.d/* files are displayed to users after login and function as a message of the day for authenticated users.\n\nRationale: If the files do not have the correct ownership, they could be modified by unauthorized users with incorrect or misleading information."
62+
title 'Ensure permissions on /etc/motd are configured'
63+
desc "The contents of the /etc/motd file are displayed to users after login and function as a message of the day for authenticated users.\n\nRationale: If the /etc/motd file does not have the correct ownership it could be modified by unauthorized users with incorrect or misleading information."
6464
impact 0.0
6565

6666
tag cis: 'distribution-independent-linux:1.7.1.4'
6767
tag level: 1
6868

69-
motd_file = '/etc/motd'
70-
71-
if File.exist?(motd_file)
72-
describe file(motd_file) do
73-
its('group') { should eq 'root' }
74-
its('owner') { should eq 'root' }
75-
its('mode') { should cmp '0644' }
76-
end
77-
end
78-
command('find /etc/update-motd.d/ -type f').stdout.split.each do |f|
79-
describe file(f) do
80-
its('group') { should eq 'root' }
81-
its('owner') { should eq 'root' }
82-
its('mode') { should cmp '0755' }
83-
end
69+
describe file('/etc/motd') do
70+
its('group') { should eq 'root' }
71+
its('owner') { should eq 'root' }
72+
its('mode') { should cmp '0644' }
8473
end
8574
end
8675

0 commit comments

Comments
 (0)