summaryrefslogtreecommitdiffstats
path: root/kernel/seccomp.c
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2020-11-20 20:39:39 +0100
committerKees Cook <keescook@chromium.org>2020-11-20 20:39:39 +0100
commit7ef95e3dbcee74caa303fe4b23c451ae4462f609 (patch)
tree619b7f4bf2e7f3d1ccf2ddf2cf62264c9c1ca570 /kernel/seccomp.c
parentseccomp: Remove bogus __user annotations (diff)
parentselftests/seccomp: sh: Fix register names (diff)
downloadlinux-7ef95e3dbcee74caa303fe4b23c451ae4462f609.tar.xz
linux-7ef95e3dbcee74caa303fe4b23c451ae4462f609.zip
Merge branch 'for-linus/seccomp' into for-next/seccomp
Diffstat (limited to 'kernel/seccomp.c')
-rw-r--r--kernel/seccomp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/seccomp.c b/kernel/seccomp.c
index 0e0e369d2fcb..c09fc2ad4bac 100644
--- a/kernel/seccomp.c
+++ b/kernel/seccomp.c
@@ -38,7 +38,7 @@
#include <linux/filter.h>
#include <linux/pid.h>
#include <linux/ptrace.h>
-#include <linux/security.h>
+#include <linux/capability.h>
#include <linux/tracehook.h>
#include <linux/uaccess.h>
#include <linux/anon_inodes.h>
@@ -649,8 +649,7 @@ static struct seccomp_filter *seccomp_prepare_filter(struct sock_fprog *fprog)
* behavior of privileged children.
*/
if (!task_no_new_privs(current) &&
- security_capable(current_cred(), current_user_ns(),
- CAP_SYS_ADMIN, CAP_OPT_NOAUDIT) != 0)
+ !ns_capable_noaudit(current_user_ns(), CAP_SYS_ADMIN))
return ERR_PTR(-EACCES);
/* Allocate a new seccomp_filter */