]> www.infradead.org Git - users/jedix/linux-maple.git/commit
selftests/landlock: Extend tests for landlock_restrict_self(2)'s flags
authorMickaël Salaün <mic@digikod.net>
Thu, 20 Mar 2025 19:07:10 +0000 (20:07 +0100)
committerMickaël Salaün <mic@digikod.net>
Wed, 26 Mar 2025 12:59:45 +0000 (13:59 +0100)
commite178b404ea0c909c51d22bddb2cfbb2124028c84
treee74f13e8752f4dda66d24c6471c84072329c30cc
parentec12a8d4c1861678bf86b0c7510068d472cd133d
selftests/landlock: Extend tests for landlock_restrict_self(2)'s flags

Add the base_test's restrict_self_fd_flags tests to align with previous
restrict_self_fd tests but with the new
LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF flag.

Add the restrict_self_flags tests to check that
LANDLOCK_RESTRICT_SELF_LOG_SAME_EXEC_OFF,
LANDLOCK_RESTRICT_SELF_LOG_NEW_EXEC_ON, and
LANDLOCK_RESTRICT_SELF_LOG_SUBDOMAINS_OFF are valid but not the next
bit.  Some checks are similar to restrict_self_checks_ordering's ones.

Cc: Günther Noack <gnoack@google.com>
Cc: Paul Moore <paul@paul-moore.com>
Link: https://lore.kernel.org/r/20250320190717.2287696-22-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/base_test.c