diff options
| author | Justin Suess <utilityemal77@gmail.com> | 2026-08-09 11:45:21 -0400 |
|---|---|---|
| committer | Mickaël Salaün <mic@digikod.net> | 2026-08-15 09:14:47 +0200 |
| commit | 71f98bc6e5ad4e04f021a6bcfcdde919fcbe431e (patch) | |
| tree | f0cfcc2dfaa8c8a5871663b818f7cc19c272b09c /tools/perf/scripts/python/bin | |
| parent | 6887c03bf2600beaa1a24e0a8c00053c236c1071 (diff) | |
selftests/landlock: Test LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS
Check that a successful landlock_restrict_self(2) call with
LANDLOCK_RESTRICT_SELF_NO_NEW_PRIVS sets no_new_privs without a prior
prctl(2) call nor CAP_SYS_ADMIN, that a failed call from both an
invalid ruleset and hitting the layer maximum leaves the attribute
unchanged, and that LANDLOCK_RESTRICT_SELF_TSYNC extends it to sibling
threads. Also check that this flag requires a ruleset.
Turn the multi_threaded_success test into a multi_threaded fixture with
success, no_new_privs, and no_new_privs_max_layers variants to factor
out the threading code.
Finally, rename restrict_self_fd_logging_flags to
restrict_self_fd_flags, and restrict_self_logging_flags to
restrict_self_flags to indicate that non-logging flags are now tested.
Test coverage for security/landlock is 91.8% of 2373 lines according to
LLVM 22.
Signed-off-by: Justin Suess <utilityemal77@gmail.com>
Link: https://patch.msgid.link/20260809154544.1253100-4-utilityemal77@gmail.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
