From 15315c5dd45aea50b1c2ac08fc9330cbc2004ea9 Mon Sep 17 00:00:00 2001 From: andy shaw Date: Wed, 12 Jul 2017 16:17:03 +1000 Subject: [PATCH 1/4] Update package_spec.rb --- controls/package_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controls/package_spec.rb b/controls/package_spec.rb index 397e05a..e24f8e3 100644 --- a/controls/package_spec.rb +++ b/controls/package_spec.rb @@ -81,6 +81,8 @@ control 'package-08' do title 'Install auditd' desc 'auditd provides extended logging capacities on recent distribution' audit_pkg = os.redhat? || os.suse? ? 'audit' : 'auditd' + puts audit_pkg + puts os describe package(audit_pkg) do it { should be_installed } end From 83b49d0e8240e26d3a4de40277a64021c877c358 Mon Sep 17 00:00:00 2001 From: andy shaw Date: Wed, 12 Jul 2017 16:39:08 +1000 Subject: [PATCH 2/4] Update package_spec.rb --- controls/package_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/controls/package_spec.rb b/controls/package_spec.rb index e24f8e3..5135511 100644 --- a/controls/package_spec.rb +++ b/controls/package_spec.rb @@ -82,7 +82,8 @@ control 'package-08' do desc 'auditd provides extended logging capacities on recent distribution' audit_pkg = os.redhat? || os.suse? ? 'audit' : 'auditd' puts audit_pkg - puts os + puts os.name + puts os.family describe package(audit_pkg) do it { should be_installed } end From 0a753a2dd759f850e5208fe63974aeaa1bc1c66e Mon Sep 17 00:00:00 2001 From: andy shaw Date: Wed, 12 Jul 2017 16:42:04 +1000 Subject: [PATCH 3/4] Update package_spec.rb --- controls/package_spec.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/controls/package_spec.rb b/controls/package_spec.rb index 5135511..303b267 100644 --- a/controls/package_spec.rb +++ b/controls/package_spec.rb @@ -80,10 +80,7 @@ control 'package-08' do impact 1.0 title 'Install auditd' desc 'auditd provides extended logging capacities on recent distribution' - audit_pkg = os.redhat? || os.suse? ? 'audit' : 'auditd' - puts audit_pkg - puts os.name - puts os.family + audit_pkg = os.redhat? || os.suse? || os.family == 'amazon' ? 'audit' : 'auditd' describe package(audit_pkg) do it { should be_installed } end From 4f518580a7f8862ccc72c2821b9297c19054dbfe Mon Sep 17 00:00:00 2001 From: andy shaw Date: Fri, 14 Jul 2017 09:54:00 +1000 Subject: [PATCH 4/4] Use od name over family. Signed-off-by: andy shaw --- controls/package_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls/package_spec.rb b/controls/package_spec.rb index 303b267..30d6733 100644 --- a/controls/package_spec.rb +++ b/controls/package_spec.rb @@ -80,7 +80,7 @@ control 'package-08' do impact 1.0 title 'Install auditd' desc 'auditd provides extended logging capacities on recent distribution' - audit_pkg = os.redhat? || os.suse? || os.family == 'amazon' ? 'audit' : 'auditd' + audit_pkg = os.redhat? || os.suse? || os.name == 'amazon' ? 'audit' : 'auditd' describe package(audit_pkg) do it { should be_installed } end