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

Steve Beattie steve at nxnw.org
Fri Apr 10 22:35:03 UTC 2015


On Fri, Apr 03, 2015 at 04:40:59PM +0200, Christian Boltz wrote:
> 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

Acked-by: Steve Beattie <steve at nxnw.org> for both.

> [ 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()

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150410/5852ff79/attachment.pgp>


More information about the AppArmor mailing list