]> git.baikalelectronics.ru Git - kernel.git/commit
kernel: Add noaudit variant of ns_capable()
authorTyler Hicks <tyhicks@canonical.com>
Fri, 3 Jun 2016 04:43:21 +0000 (23:43 -0500)
committerJames Morris <james.l.morris@oracle.com>
Mon, 6 Jun 2016 10:16:18 +0000 (20:16 +1000)
commitfe821bb2725a6a5bf92eecae12d6485e0cd886f3
treeae14325043192683972bc25ca35c8b7ceb8b8241
parent4e1492d3048e92b350b685802539f01a01cce373
kernel: Add noaudit variant of ns_capable()

When checking the current cred for a capability in a specific user
namespace, it isn't always desirable to have the LSMs audit the check.
This patch adds a noaudit variant of ns_capable() for when those
situations arise.

The common logic between ns_capable() and the new ns_capable_noaudit()
is moved into a single, shared function to keep duplicated code to a
minimum and ease maintainability.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
include/linux/capability.h
kernel/capability.c