Skip to content

Commit

Permalink
actually fix inconsistent formatting
Browse files Browse the repository at this point in the history
Signed-off-by: kemley76 <kemley@mitre.org>
  • Loading branch information
kemley76 committed Jun 17, 2024
1 parent 4ccb789 commit f7bf5f3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions controls/SV-257805.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@
end

config_files = command('find /etc/modprobe.conf /etc/modprobe.d/* -print0').stdout.split("\0")
blacklisted = config_files.any? do |c|
params = parse_config_file(c, comment_char: '#', multiple_values: true,
assignment_regex: /^(\S+)\s+(\S+)$/).params
params.include?('blacklist') and params['blacklist'].include?('can')
end

describe 'can' do
it 'is configured to be blacklisted' do
expect(config_files.any? do |c|
params = parse_config_file(c, comment_char: '#', multiple_values: true,
assignment_regex: /^(\S+)\s+(\S+)$/).params
params.include?('blacklist') and params['blacklist'].include?('can')
end).to eq(true)
expect(blacklisted).to eq(true)
end
end
end

0 comments on commit f7bf5f3

Please sign in to comment.