]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
selftests/landlock: Fully test file rename with "remove" access
authorMickaël Salaün <mic@digikod.net>
Fri, 6 May 2022 16:08:16 +0000 (18:08 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 10 Aug 2022 07:25:17 +0000 (09:25 +0200)
commitcd5730c93aee16e222f6f26a37736856a34d1fe7
tree3256f91211b9f2623317b8cbfb371ada3c35b35d
parent59d7ae27e7f9a1ceb8ecc5fd6a0bfbe8a4b9e586
selftests/landlock: Fully test file rename with "remove" access

BugLink: https://bugs.launchpad.net/bugs/1981864
commit 6a1bdd4a0bfc30fa4fa2b3a979e6525f28996db9 upstream.

These tests were missing to check the check_access_path() call with all
combinations of maybe_remove(old_dentry) and maybe_remove(new_dentry).

Extend layout1.link with a new complementary test and check that
REMOVE_FILE is not required to link a file.

Cc: Shuah Khan <shuah@kernel.org>
Link: https://lore.kernel.org/r/20220506160820.524344-7-mic@digikod.net
Cc: stable@vger.kernel.org
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/testing/selftests/landlock/fs_test.c