Skip to content
Commit 98f368e9 authored by Tyler Hicks's avatar Tyler Hicks Committed by James Morris
Browse files

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: default avatarTyler Hicks <tyhicks@canonical.com>
Acked-by: default avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: default avatarJames Morris <james.l.morris@oracle.com>
parent 2885c1e3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment