While the python-based AppArmor utils (aa-logprof etc.) are much easier to understand and maintain than the old perl code, there are still some terribly long functions like parseprofiledata() in aa.py that are not too easy to understand. Also, using hasher() (a recursive array) as storage can have some strange side effects. Another problem is that test coverage isn't too good, especially for the bigger functions.

I already wrote the CapabilityRule and CapabilityRuleset classes (and also the BaseRule and BaseRuleset classes) some months ago, and changed the code to use those classes. This code is already in upstream bzr.

My plan for hackweek is to convert more rule types into classes, and to add full test coverage for them. Besides much more readable code, this will also result in "accidently" fixing some bugs that were not noticed yet.

A side goal is to keep the upstream devs busy with patch reviews by continueing my patch flood I started some weeks ago *g*

I'll start with network rules / the NetworkRule and NetworkRuleset classes, and then maybe roll a dice to decide what I'll convert next ;-)

Looking for mad skills in:

apparmor python tests

This project is part of:

Hack Week 12

Activity

  • over 4 years ago: cboltz added keyword "tests" to AppArmor utils: rewrite more rule types into classes
  • over 4 years ago: cboltz added keyword "python" to AppArmor utils: rewrite more rule types into classes
  • over 4 years ago: cboltz added keyword "apparmor" to AppArmor utils: rewrite more rule types into classes
  • over 4 years ago: cboltz liked AppArmor utils: rewrite more rule types into classes
  • over 4 years ago: cboltz started AppArmor utils: rewrite more rule types into classes
  • Show History

    Comments

    • cboltz
      over 4 years ago by cboltz | Reply

      Some minutes ago, I finally commited the NetworkRule and NetworkRuleset classes (and the patch that actually uses them) to AppArmor bzr - they were delayed by some previous patches with a slower-than-usual review (dependencies not only happen for packages ;-)

      I'll continue to rewrite more rule types into classes, but that will probably have to wait after oSC15 and can also happen without formal hackweek tracking ;-)

    Similar Projects

    Uyuni: improve spacewalk-repo-sync performance by moio

    Let's make reposync faster

    Every day,

    ...


    Make "salt-toaster" available to be used outside SUSE by PSuarezHernandez

    The salt-toaster (https://github.com/openSUSE...


    Finish packaging Angr in OBS by a_faerber

    Following a FOSDEM presentation on [Angr](http:...


    Evaluate mirrormanager (or mirrormanager2) for download.opensuse.org mirror management by lrupp

    As there is no progress around [MIrrorPinky](ht...


    Porting Askbot to Python 3 by rbueker

    During the last year Askbot, a question and ans...