[apparmor] [patch] Initialize incname in is_known_rule()

Christian Boltz apparmor at cboltz.de
Sat Jul 4 16:22:51 UTC 2015


Hello,

$subject.

Without this, we can run into
    NameError: name 'include_name' is not defined
if a profile doesn't contain any include and the audit.log 
contains an event for that profile.


[ 59-is_known_rule-init-incname.diff ]

=== modified file utils/apparmor/aa.py
--- utils/apparmor/aa.py        2015-06-24 22:57:06.959165164 +0200
+++ utils/apparmor/aa.py        2015-07-04 18:16:17.193163125 +0200
@@ -4090,6 +4092,7 @@
     includelist = list(profile['include'].keys())
     checked = []
 
+    incname = False
     if includelist:
         incname = includelist.pop(0)
 

Regards,

Christian Boltz
-- 
Ich verlas mich. Die Dokumentation ist devel und nicht unstable, daher
kann wohl nur ein kyrillischer Zeichensatz oder gar ein inhaltlicher
Fehler vorkommen. Obwohl... Man könnte sie unter Windows 95 lesen, damit
sie abstürzt. Das wäre aber OT.   [Ferdinand Ihringer in suse-linux]




More information about the AppArmor mailing list