OpenCloudOS-Kernel/tools/testing/selftests/seccomp
Gautam Menghani fc1e398004 selftests/seccomp: Check CAP_SYS_ADMIN capability in the test mode_filter_without_nnp
In the "mode_filter_without_nnp" test in seccomp_bpf, there is currently
a TODO which asks to check the capability CAP_SYS_ADMIN instead of euid.
This patch adds support to check if the calling process has the flag
CAP_SYS_ADMIN, and also if this flag has CAP_EFFECTIVE set.

Signed-off-by: Gautam Menghani <gautammenghani201@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220731092529.28760-1-gautammenghani201@gmail.com
2022-12-02 11:32:53 -08:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile selftests/seccomp: Test PTRACE_O_SUSPEND_SECCOMP without CAP_SYS_ADMIN 2022-04-29 11:28:42 -07:00
config selftests/seccomp: Update kernel config 2020-12-02 11:20:54 -08:00
seccomp_benchmark.c selftests/seccomp: remove ARRAY_SIZE define from seccomp_benchmark 2021-12-10 17:51:09 -07:00
seccomp_bpf.c selftests/seccomp: Check CAP_SYS_ADMIN capability in the test mode_filter_without_nnp 2022-12-02 11:32:53 -08:00
settings selftests/seccomp: Compare bitmap vs filter overhead 2020-11-20 11:16:34 -08:00