Skip to content

Commit

Permalink
fix: cis-dil-benchmark-2.2.1.3 read /etc/chrony.d
Browse files Browse the repository at this point in the history
On AL2023, the folder /etc/chrony.d exists in which additional
chrony sources can be configured.

Signed-off-by: Ivo van Doorn <[email protected]>
  • Loading branch information
IvDoorn committed Nov 15, 2023
1 parent 975fd37 commit 2d2a3fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controls/2_2_special_purpose_services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@
package('chrony').installed? || command('chronyd').exist?
end

# Amazon Linux sources configuration from /run/chrony.d
# Amazon Linux sources configuration from /run/chrony.d and /etc/chrony.d
chrony_conf_files = ['/etc/chrony/chrony.conf', '/etc/chrony.conf']
chrony_conf_files += command('find /run/chrony.d -name \'*.sources\'').stdout.split
chrony_conf_files += command('find /etc/chrony.d -name \'*.sources\'').stdout.split

describe.one do
chrony_conf_files.each do |f|
Expand Down

0 comments on commit 2d2a3fc

Please sign in to comment.