This commit is contained in:
d4t4king 2016-11-24 23:41:44 -08:00
commit 0306030a4e

View File

@ -160,13 +160,13 @@ if ($debug) {
if ($json) { if ($json) {
require JSON; require JSON;
# tidy up some of the "object" variables # tidy up some of the "object" variables
my @sduf = @{$lynis_report_data{'systemd_unit_file[]'}}; my @sduf = @{$lynis_report_data{'systemd_unit_file'}};
my @sduf_new; my @sduf_new;
foreach my $uf ( @sduf ) { foreach my $uf ( @sduf ) {
my ($name,$status) = split(/\|/, $uf); my ($name,$status) = split(/\|/, $uf);
push @sduf_new, { 'name' => $name, 'state' => $status }; push @sduf_new, { 'name' => $name, 'state' => $status };
} }
$lynis_report_data{'systemd_unit_file[]'} = \@sduf_new; $lynis_report_data{'systemd_unit_file'} = \@sduf_new;
my @ipa = @{$lynis_report_data{'installed_packages_array'}}; my @ipa = @{$lynis_report_data{'installed_packages_array'}};
my @ipa_new; my @ipa_new;
foreach my $pkg ( @ipa ) { foreach my $pkg ( @ipa ) {