File apparmor-utils-cleanup-on-abort of Package apparmor.import4985

From: Jeff Mahoney <>
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

 This patch removes all profiles created during the run up to an abort.

Signed-off-by: Jeff Mahoney <>

 utils/ |    3 +++
 1 file changed, 3 insertions(+)

--- a/utils/
+++ b/utils/
@@ -1750,6 +1750,9 @@ sub confirm_and_abort {
     if ($ans eq "y") {
         UI_Info(gettext("Abandoning all changes."));
+        foreach my $prof (@created) {
+            delete_profile($prof);
+        }
         exit 0;
openSUSE Build Service is sponsored by