[apparmor] [patch] Fix serialize_profile_from_old_profiles() to not crash on "@{var} +="

Steve Beattie steve at nxnw.org
Wed Apr 15 19:12:41 UTC 2015


On Wed, Apr 08, 2015 at 11:06:23PM +0200, Christian Boltz wrote:
> Hello,
> 
> serialize_profile_from_old_profiles() calls store_list_var() with an
> empty hasher. This fails for "+=" because in this case store_list_var()
> expects a non-empty hasher with the variable already defined, and raises
> an exception because of the empty hasher.
> 
> This patch sets "correct = False" if a "+=" operation appears, which
> means the variable will be written in "clean" mode instead.
> 
> Adding proper support for "add to variable" needs big changes (like
> storing a variable's "history" - where it was initially defined and what
> got added where).
> 
> 
> I propose this patch for trunk and 2.9.

> [ 35-fix-serialize_profile_from_old_profiles-variable-add.diff ]

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

-- 
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/20150415/211f9967/attachment.pgp>


More information about the AppArmor mailing list