[apparmor] [patch] AATest: don't limit diff length

2015-04-11 Thread Christian Boltz
Hello, this patch adds setUp() to AATest that sets self.maxDiff = None (unlimited). This gives us unlimited array diffs everywhere where AATest is used. Also replace several setUp() functions in test-regex_matches.py that just set a class variable with setting the class variable directly. This

[apparmor] [patch] Add tests for Baserule

2015-04-11 Thread Christian Boltz
Hello, This patch adds some tests for the Baserule class to cover the 3 functions that must be re-implemented in each rule class. This means we finally get 100% test coverage for apparmor/rule/__init__.py ;-) If we merge the rule classes into 2.9, then this patch should also go in. Note: this

[apparmor] [patch] Add a missing check in rule class is_covered()

2015-04-11 Thread Christian Boltz
Hello, capability foo.is_covered(deny capability foo) should return False even if check_allow_deny is False. Also add some tests with check_allow_deny=False. If we merge the rule classes into 2.9, this patch should also go in. [ 40-ruleclass-is_covered-check-deny.diff ] === modified file

Re: [apparmor] New LibreOffice Profile

2015-04-11 Thread Christian Boltz
Hello, Am Freitag, 10. April 2015 schrieb Seth Arnold: On Fri, Apr 10, 2015 at 02:54:26PM -0400, Bryan Quigley wrote: BTW: On openSUSE, LibreOffice is installed to /usr/lib64/... on 64bit systems, so you might want to change the profile names to /usr/lib*/... Changed them all to

[apparmor] [patch] Implement in-profile de-duplication in BaseRuleset

2015-04-11 Thread Christian Boltz
Hello, this patch implements in-profile de-duplication in BaseRuleset (currently affects only CapabilityRuleset, but will also work for all future *Ruleset classes). The method I use is probably slightly confusing, but it works ;-) (1) Store the current rules in oldrules, empty self.rules and

[apparmor] [patch] Make sure aa-cleanprof de-duplicates capability rules

2015-04-11 Thread Christian Boltz
Hello, CleanProf.remove_duplicate_rules() didn't call $profile['capability'].delete_duplicates() because aa-cleanprof sets same_file=True. Fix this by calling delete_duplicates(None) so that it only checks the profile against itsself. [ 43-cleanprof-do-in-profile-run.diff ] === modified