[apparmor] [patch] fix create_new_profile() to avoid aa-genprof crash

Christian Boltz apparmor at cboltz.de
Sun Jul 12 16:00:28 UTC 2015


Hello,

*** important patch for 2.10 *** coming soon: another aa-genprof crash fix ***

create_new_profile() created a wrong structure for local_profile, which
resulted in an aa-genprof crash directly at startup (in the autodep
phase).

This patch fixes it to use the correct structure.


[ 73-fix-create_new_profile-storage.diff ]

diff -ru '--exclude=.bzr' ../HEAD-patches-applied/utils/apparmor/aa.py ./utils/apparmor/aa.py
--- utils/apparmor/aa.py        2015-07-11 14:11:47.841095598 +0200
+++ ./utils/apparmor/aa.py      2015-07-12 17:48:31.600034572 +0200
@@ -430,7 +430,8 @@
     return profile
 
 def create_new_profile(localfile, is_stub=False):
-    local_profile = profile_storage()
+    local_profile = hasher()
+    local_profile[localfile] = profile_storage()
     local_profile[localfile]['flags'] = 'complain'
     local_profile[localfile]['include']['abstractions/base'] = 1
 



Regards,

Christian Boltz
-- 
Ich frage mich, ob es einen richtigen Browser als Active-X Applet
für den MSIE gibt?                                  [K. Köhntopp]




More information about the AppArmor mailing list