Hello,

Network rules are the only rule type that had this safety net - if
profile_data[profile][hat] really isn't initialized (which shouldn't
happen), things will break at lots of other places ;-)


[ 01-drop-network-safety-net.diff ]

=== modified file ./utils/apparmor/aa.py
--- utils/apparmor/aa.py        2017-06-15 23:18:30.216491386 +0200
+++ utils/apparmor/aa.py        2017-07-09 12:11:53.907188928 +0200
@@ -2421,10 +2426,6 @@
             if not profile:
                 raise AppArmorException(_('Syntax Error: Unexpected network 
entry found in file: %(file)s line: %(line)s') % { 'file': file, 'line': lineno 
+ 1 })
 
-            # init rule class (if not done yet)
-            if not profile_data[profile][hat].get('network', False):
-                profile_data[profile][hat]['network'] = NetworkRuleset()
-
             profile_data[profile][hat]['network'].add(NetworkRule.parse(line))
 
         elif DbusRule.match(line):


Regards,

Christian Boltz
-- 
> Dann viel spass mit deinem, hoffentlich roten, Hut vor deinem
> Postfix ;-) Warum auch nicht?
Vielleicht liegt es an mir, aber ich verstehe leider auch diese
Bemerkung nicht. Muss ich die erst mit m4 kompilieren?
[> Daniel Hanke und Sandy Drobic in suse-linux]

Attachment: signature.asc
Description: This is a digitally signed message part.

-- 
AppArmor mailing list
AppArmor@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/apparmor

Reply via email to