core: centralize RestrictFileSystemAccess= checks

Centralize the checks for RestrictFileSystemAccess= requirements.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
Christian Brauner
2026-08-31 23:33:39 +02:00
parent c35f061634
commit 73e093d16d
4 changed files with 41 additions and 37 deletions
@@ -90,9 +90,8 @@ testcase_no_require_signatures_helper() {
fi
fi
# The helper's "check" command runs the same bpf_restrict_fsaccess_supported()
# and dm_verity_require_signatures() checks that PID1 uses. It must fail
# because require_signatures is not enabled.
# The helper's "check" command runs the same bpf_restrict_fsaccess_check_prerequisites()
# checks that PID1 uses. It must fail because require_signatures is not enabled.
if "$HELPER" check; then
echo "ERROR: helper check succeeded but require_signatures is not enabled"
return 1