landlock: Refactor check_access_path_dual() into is_access_to_paths_allowed()
authorGünther Noack <gnoack3000@gmail.com>
Tue, 18 Oct 2022 18:22:07 +0000 (20:22 +0200)
committerMickaël Salaün <mic@digikod.net>
Wed, 19 Oct 2022 07:01:43 +0000 (09:01 +0200)
commit106794c46b13a2820d3954d7a2892fa1978b4162
tree253c3824b76926c0a7c0c20f5462342c5c58cbbd
parent3350607dc5637be2563f484dcfe2fed456f3d4ff
landlock: Refactor check_access_path_dual() into is_access_to_paths_allowed()

Rename check_access_path_dual() to is_access_to_paths_allowed().

Make it return true iff the access is allowed.

Calculate the EXDEV/EACCES error code in the one place where it's needed.

Suggested-by: Mickaël Salaün <mic@digikod.net>
Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20221018182216.301684-3-gnoack3000@gmail.com
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/fs.c