selftests/landlock: Test ioctl(2) and ftruncate(2) with open(O_PATH)
authorGünther Noack <gnoack@google.com>
Fri, 19 Apr 2024 16:11:15 +0000 (16:11 +0000)
committerMickaël Salaün <mic@digikod.net>
Mon, 13 May 2024 04:58:31 +0000 (06:58 +0200)
commit7954a1d155975a3fbc9570151358738f59605121
tree17043dc6dc5dae7c27217f59781016887a95ef2f
parentdd6d32afdf5f1869a8f543e8efdd191f7e4b0368
selftests/landlock: Test ioctl(2) and ftruncate(2) with open(O_PATH)

ioctl(2) and ftruncate(2) operations on files opened with O_PATH
should always return EBADF, independent of the
LANDLOCK_ACCESS_FS_TRUNCATE and LANDLOCK_ACCESS_FS_IOCTL_DEV access
rights in that file hierarchy.

Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack@google.com>
Link: https://lore.kernel.org/r/20240419161122.2023765-5-gnoack@google.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/fs_test.c