~peter-maloney/bzr/peter

Viewing all changes in revision 2783.

  • Committer: Christian Boltz
  • Date: 2014-11-14 01:27:33 UTC
  • Revision ID: apparmor@cboltz.de-20141114012733-bdlptvm3qokftust
fix "unknown capability: CAP_whatever" in aa-logprof

When aa-logprof asks for a capability, you'll see something like

    WARN: unknown capability: CAP_block_suspend

The reason for the warning and "Severity: unknown" is that severity.db
contains the capability names in uppercase, but ask_the_question() calls
sev_db.rank with the capability in lowercase.

This patch converts the "CAP_$capability" string to uppercase before
doing the lookup.

Acked-by: Steve Beattie <steve@nxnw.org>



Also add a testcase (written by Steve Beattie) to ensure this stays fixed.

Acked-by: Seth Arnold <seth.arnold@canonical.com>
Acked-by: Christian Boltz <apparmor@cboltz.de>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: