[apparmor] [patch] Fix doubled array in exec rules

Christian Boltz apparmor at cboltz.de
Fri Apr 3 14:40:59 UTC 2015


Hello,

when parsing a profile with named exec rules, the exec target included
the arrow. This resulted in two arrows when writing the profile (and one 
more each time the profile was updated).
                                                       
Fix this by using the match group that only contains the exec target
without the arrow in parse_profile_data() and      
serialize_profile_from_old_profile().

References: https://bugs.launchpad.net/apparmor/+bug/1437901


I propose this patch for trunk and 2.9


[ 32-fix-double-exec-array.diff ]

=== modified file utils/apparmor/aa.py
--- utils/apparmor/aa.py        2015-04-02 22:29:43.152350931 +0200
+++ utils/apparmor/aa.py        2015-04-03 15:45:44.245458819 +0200
@@ -2903,7 +2903,7 @@
 
             path = strip_quotes(matches[4].strip())
             mode = matches[5]
-            nt_name = matches[6]
+            nt_name = matches[7]
             if nt_name:
                 nt_name = nt_name.strip()
 
@@ -4110,7 +4110,7 @@
 
                 path = strip_quotes(matches[4].strip())
                 mode = matches[5]
-                nt_name = matches[6]
+                nt_name = matches[7]
                 if nt_name:
                     nt_name = nt_name.strip()
 


Regards,

Christian Boltz
-- 
Gibt es ein Buch über das maßvolle Verwenden von Fußnoten?
Wenn ja, dann bin ich bereit, Dir ein Exemplar zu schicken.
[Thorsten Haude zu David Haller in sl-etikette]




More information about the AppArmor mailing list