[apparmor] [2 patches] utils: write prior segments processing

Steve Beattie steve at nxnw.org
Wed Nov 26 20:57:51 UTC 2014


Hi,

While trying to help Christian diagnose some problems I was having with
his capabilities classes patches, I wrote the following patches.

The first was discovered while writing the second: the assignment for
setting segments['include'] = True is wrong, it occurs inside the
'if not segments['include'] and True in segments.values():' block,
whereas it needs to always get set outside of that if test.

The second pulls out all the common processing for writing out each
of the prior segments that need to be written before writing the
current segment into a function called 'write_prior_segments', reducing
a bunch of ugly duplication.

Both patches Signed-off-by: Steve Beattie <steve at nxnw.org>
-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utils-fix_segments_include_indention.patch
Type: text/x-diff
Size: 787 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141126/15a9d009/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: utils-pull_out_common_segment_processing.patch
Type: text/x-diff
Size: 12726 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20141126/15a9d009/attachment-0001.patch>
-------------- 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/20141126/15a9d009/attachment.pgp>


More information about the AppArmor mailing list