2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 06:16:03 +00:00

keep logprof/genprof from spinning forever if the very last line in the

logfile is "PERMITTING x access to ..."
This commit is contained in:
Jesse Michael
2007-03-29 16:39:28 +00:00
parent 94f53ffcc9
commit 33a58a858d

View File

@@ -1535,8 +1535,9 @@ sub do_logprof_pass {
if ($sdmode eq "PERMITTING") {
do {
$stuffed = <LOG>;
} until $stuffed =~ /AppArmor|audit/;
if ($stuffed =~ m/changing_profile/) {
} until ((! $stuffed) || ($stuffed =~ /AppArmor|audit/));
if ($stuffed && ($stuffed =~ m/changing_profile/)) {
$domainchange = "change";
$stuffed = undef;
}