[apparmor] [patch] severity.py: rename handle_capability() to rank_capability()
Kshitij Gupta
kgupta8592 at gmail.com
Mon May 25 13:47:24 UTC 2015
Hello,
On Sun, May 24, 2015 at 6:11 PM, Christian Boltz <apparmor at cboltz.de> wrote:
> Hello,
>
> this patch renames handle_capability() to rank_capability().
>
> How does capability_severity_value() seem as an option?
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?
Regards,
Kshitij Gupta
> [ 14-severity-rename-handle_capability.diff ]
>
> === modified file 'utils/apparmor/severity.py'
> --- utils/apparmor/severity.py 2014-11-14 01:27:33 +0000
> +++ utils/apparmor/severity.py 2015-05-24 12:27:11 +0000
> @@ -75,7 +75,7 @@
> else:
> raise AppArmorException("Unexpected line in file:
> %s\n\t[Line %s]: %s" % (dbname, lineno, line))
>
> - def handle_capability(self, resource):
> + def rank_capability(self, resource):
> """Returns the severity of for the capability resource, default
> value if no match"""
> cap = resource.upper()
> if cap in self.severity['CAPABILITIES'].keys():
> @@ -136,7 +136,7 @@
> elif resource[0] == '/': # file resource
> return self.handle_file(resource, mode)
> elif resource[0:4] == 'CAP_': # capability resource
> - return self.handle_capability(resource)
> + return self.rank_capability(resource)
> else:
> raise AppArmorException("Unexpected rank input: %s" %
> resource)
>
>
>
>
>
>
> Regards,
>
> Christian Boltz
> --
> Linux sollte Linux bleiben und nicht versuchen, ein besseres Windows zu
> sein. Das ist IMHO der groesste Fehler! Warte mal noch ein oder zwei
> Jahre ab, da werden dann "blue screens" unter KDE vermutlich auch zum
> Alltag werden. [Thomas Hertweck in suse-linux]
>
>
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/apparmor
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20150525/6f21dd1b/attachment-0001.html>
More information about the AppArmor
mailing list