mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-03 07:45:50 +00:00
re-enable warnings for the utils perl modules and fix a couple initial
problems exposed by that. there are likely to be more fixes coming.
This commit is contained in:
@@ -31,6 +31,7 @@ package Immunix::Reports;
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
use strict;
|
use strict;
|
||||||
|
|
||||||
use DBI;
|
use DBI;
|
||||||
use DBD::SQLite;
|
use DBD::SQLite;
|
||||||
use Locale::gettext;
|
use Locale::gettext;
|
||||||
@@ -518,7 +519,6 @@ sub exportLog {
|
|||||||
if ($header) { print LOG "$header\n\n"; }
|
if ($header) { print LOG "$header\n\n"; }
|
||||||
|
|
||||||
for (@$db) {
|
for (@$db) {
|
||||||
no strict;
|
|
||||||
|
|
||||||
# host time prog profile pid severity resource sdmode mode
|
# host time prog profile pid severity resource sdmode mode
|
||||||
#print LOG "$_->{'host'},$_->{'time'},$_->{'prog'},$_->{'profile'},$_->{'pid'},";
|
#print LOG "$_->{'host'},$_->{'time'},$_->{'prog'},$_->{'profile'},$_->{'pid'},";
|
||||||
@@ -548,7 +548,6 @@ sub exportLog {
|
|||||||
my $idx = 1;
|
my $idx = 1;
|
||||||
|
|
||||||
for (@$db) {
|
for (@$db) {
|
||||||
no strict;
|
|
||||||
$idx++;
|
$idx++;
|
||||||
if ($idx % 2 == 0) {
|
if ($idx % 2 == 0) {
|
||||||
|
|
||||||
|
@@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
package Immunix::SubDomain;
|
package Immunix::SubDomain;
|
||||||
|
|
||||||
use warnings;
|
|
||||||
use strict;
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
use Carp;
|
use Carp;
|
||||||
use Cwd qw(cwd realpath);
|
use Cwd qw(cwd realpath);
|
||||||
@@ -89,8 +89,6 @@ our @EXPORT = qw(
|
|||||||
checkIncludeSyntax
|
checkIncludeSyntax
|
||||||
);
|
);
|
||||||
|
|
||||||
no warnings 'all';
|
|
||||||
|
|
||||||
our $confdir = "/etc/apparmor";
|
our $confdir = "/etc/apparmor";
|
||||||
|
|
||||||
our $running_under_genprof = 0;
|
our $running_under_genprof = 0;
|
||||||
@@ -156,6 +154,9 @@ our %t;
|
|||||||
our %transitions;
|
our %transitions;
|
||||||
our %sd; # we keep track of the original profiles in %sd
|
our %sd; # we keep track of the original profiles in %sd
|
||||||
|
|
||||||
|
my @log;
|
||||||
|
my %pid;
|
||||||
|
|
||||||
my %seen;
|
my %seen;
|
||||||
my %profilechanges;
|
my %profilechanges;
|
||||||
my %prelog;
|
my %prelog;
|
||||||
@@ -293,8 +294,6 @@ sub setup_yast {
|
|||||||
unless ($@) {
|
unless ($@) {
|
||||||
import ycp;
|
import ycp;
|
||||||
|
|
||||||
no warnings 'all';
|
|
||||||
|
|
||||||
$UI_Mode = "yast";
|
$UI_Mode = "yast";
|
||||||
|
|
||||||
# let the frontend know that we're starting
|
# let the frontend know that we're starting
|
||||||
@@ -343,7 +342,7 @@ sub check_for_subdomain () {
|
|||||||
close(MOUNTS);
|
close(MOUNTS);
|
||||||
}
|
}
|
||||||
|
|
||||||
my $sd_mountpoint;
|
my $sd_mountpoint = "";
|
||||||
if (open(MOUNTS, "/proc/mounts")) {
|
if (open(MOUNTS, "/proc/mounts")) {
|
||||||
while (<MOUNTS>) {
|
while (<MOUNTS>) {
|
||||||
if ($support_subdomainfs) {
|
if ($support_subdomainfs) {
|
||||||
@@ -1436,6 +1435,18 @@ sub handlechildren {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub add_to_tree ($@) {
|
||||||
|
my ($pid, $type, @event) = @_;
|
||||||
|
|
||||||
|
unless (exists $pid{$pid}) {
|
||||||
|
my $arrayref = [];
|
||||||
|
push @log, $arrayref;
|
||||||
|
$pid{$pid} = $arrayref;
|
||||||
|
}
|
||||||
|
|
||||||
|
push @{ $pid{$pid} }, [ $type, $pid, @event ];
|
||||||
|
}
|
||||||
|
|
||||||
sub do_logprof_pass {
|
sub do_logprof_pass {
|
||||||
my $logmark = shift || "";
|
my $logmark = shift || "";
|
||||||
|
|
||||||
@@ -1460,21 +1471,6 @@ sub do_logprof_pass {
|
|||||||
|
|
||||||
$sevdb = new Immunix::Severity("$confdir/severity.db", gettext("unknown"));
|
$sevdb = new Immunix::Severity("$confdir/severity.db", gettext("unknown"));
|
||||||
|
|
||||||
my @log;
|
|
||||||
my %pid;
|
|
||||||
|
|
||||||
sub add_to_tree ($@) {
|
|
||||||
my ($pid, $type, @event) = @_;
|
|
||||||
|
|
||||||
unless (exists $pid{$pid}) {
|
|
||||||
my $arrayref = [];
|
|
||||||
push @log, $arrayref;
|
|
||||||
$pid{$pid} = $arrayref;
|
|
||||||
}
|
|
||||||
|
|
||||||
push @{ $pid{$pid} }, [ $type, $pid, @event ];
|
|
||||||
}
|
|
||||||
|
|
||||||
my $stuffed = undef;
|
my $stuffed = undef;
|
||||||
my $last;
|
my $last;
|
||||||
|
|
||||||
@@ -2402,7 +2398,7 @@ sub readprofile ($$) {
|
|||||||
|
|
||||||
# deal with whitespace in profile and hat names.
|
# deal with whitespace in profile and hat names.
|
||||||
$profile = $1 if $profile =~ /^"(.+)"$/;
|
$profile = $1 if $profile =~ /^"(.+)"$/;
|
||||||
$hat = $1 if $hat =~ /^"(.+)"$/;
|
$hat = $1 if $hat && $hat =~ /^"(.+)"$/;
|
||||||
|
|
||||||
# if we run into old-style hat declarations mark the profile as
|
# if we run into old-style hat declarations mark the profile as
|
||||||
# changed so we'll write it out as new-style
|
# changed so we'll write it out as new-style
|
||||||
|
Reference in New Issue
Block a user