Marcus Rueckert
f270973a6c
Accepted submit request 57745 from user jeff_mahoney OBS-URL: https://build.opensuse.org/request/show/57745 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apparmor?expand=0&rev=1
30 lines
842 B
Plaintext
30 lines
842 B
Plaintext
From: Jeff Mahoney <jeffm@suse.com>
|
|
Subject: [PATCH] apparmor-utils: cleanup after abort in genprof
|
|
References: bnc#307067
|
|
|
|
The initial generation of the base profile is required to be written out
|
|
to put the process in complain mode for observation. If the user
|
|
decides to abort the profiling session, that base profile is left
|
|
behind.
|
|
|
|
This patch removes all profiles created during the run up to an abort.
|
|
|
|
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
|
|
---
|
|
|
|
utils/SubDomain.pm | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
--- a/utils/SubDomain.pm
|
|
+++ b/utils/SubDomain.pm
|
|
@@ -1750,6 +1750,9 @@ sub confirm_and_abort {
|
|
if ($ans eq "y") {
|
|
UI_Info(gettext("Abandoning all changes."));
|
|
shutdown_yast();
|
|
+ foreach my $prof (@created) {
|
|
+ delete_profile($prof);
|
|
+ }
|
|
exit 0;
|
|
}
|
|
}
|