[apparmor] [patch] severity.py: rename handle_capability() to rank_capability()

Christian Boltz apparmor at cboltz.de
Tue May 26 21:12:48 UTC 2015


Hello,

Am Montag, 25. Mai 2015 schrieb Kshitij Gupta:
> On Sun, May 24, 2015 at 6:11 PM, Christian Boltz wrote:
> > this patch renames handle_capability() to rank_capability().
> > 
> How does capability_severity_value() seem as an option?

I wanted to have something that is close to rank(), so rank_capability() 
looks like a good name.

Additionally, it's a method of a sev_db object, so in practise you'll 
see something like sev_db.rank_capability() - and this means we don't 
need to repeat the word "severity" in the function name ;-)

> > It's only used inside severity.py until now, but I plan to change 
> > that and want a better function name ;-)
> 
> Where can we expect to see this?

No need to expect it - just have a look at 
16-test-severity-convert-to-AATest.diff (testcase) and 
20-capability-rule-add-severity.diff (real usage) ;-)


Regards,

Christian Boltz
-- 
>He Mann, isse krasse, erste Wort: "Kyptographie", isse schon falsch.
>Was machst du?
Uuuhhh. Ist in der Listenkasse noch genug Geld für ein Wörterbuch?
[> Ratti und Thorsten Haude in sl-etikette]




More information about the AppArmor mailing list