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

Steve Beattie steve at nxnw.org
Mon Jul 13 22:58:31 UTC 2015


On Sun, Jul 12, 2015 at 06:00:28PM +0200, Christian Boltz wrote:
> *** 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 ]

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

> 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
>  

-- 
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/20150713/fff5c9fd/attachment.pgp>


More information about the AppArmor mailing list