2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +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:
Jesse Michael
2007-03-21 16:49:39 +00:00
parent e5ac6de656
commit 360ffc756e
2 changed files with 19 additions and 24 deletions

View File

@@ -31,6 +31,7 @@ package Immunix::Reports;
################################################################################
use strict;
use DBI;
use DBD::SQLite;
use Locale::gettext;
@@ -518,7 +519,6 @@ sub exportLog {
if ($header) { print LOG "$header\n\n"; }
for (@$db) {
no strict;
# host time prog profile pid severity resource sdmode mode
#print LOG "$_->{'host'},$_->{'time'},$_->{'prog'},$_->{'profile'},$_->{'pid'},";
@@ -548,7 +548,6 @@ sub exportLog {
my $idx = 1;
for (@$db) {
no strict;
$idx++;
if ($idx % 2 == 0) {

View File

@@ -21,8 +21,8 @@
package Immunix::SubDomain;
use warnings;
use strict;
use warnings;
use Carp;
use Cwd qw(cwd realpath);
@@ -89,8 +89,6 @@ our @EXPORT = qw(
checkIncludeSyntax
);
no warnings 'all';
our $confdir = "/etc/apparmor";
our $running_under_genprof = 0;
@@ -156,6 +154,9 @@ our %t;
our %transitions;
our %sd; # we keep track of the original profiles in %sd
my @log;
my %pid;
my %seen;
my %profilechanges;
my %prelog;
@@ -293,8 +294,6 @@ sub setup_yast {
unless ($@) {
import ycp;
no warnings 'all';
$UI_Mode = "yast";
# let the frontend know that we're starting
@@ -343,7 +342,7 @@ sub check_for_subdomain () {
close(MOUNTS);
}
my $sd_mountpoint;
my $sd_mountpoint = "";
if (open(MOUNTS, "/proc/mounts")) {
while (<MOUNTS>) {
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 {
my $logmark = shift || "";
@@ -1460,21 +1471,6 @@ sub do_logprof_pass {
$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 $last;
@@ -2402,7 +2398,7 @@ sub readprofile ($$) {
# deal with whitespace in profile and hat names.
$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
# changed so we'll write it out as new-style