]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
landlock: Move filesystem helpers and add a new one
authorMickaël Salaün <mic@digikod.net>
Fri, 6 May 2022 16:10:55 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:49:57 +0000 (12:49 +0100)
commitb32a42383c26cd672badb46b3c66e12b6b7337db
tree0b9007429f03f483f048634b13ca39b772eb1696
parentba079f94cb0aa061428f56c54a186d87b9d90390
landlock: Move filesystem helpers and add a new one

[ Upstream commit 9da82b20fde95814af721a2a7b1796a5b4a3d78e ]

Move the SB_NOUSER and IS_PRIVATE dentry check to a standalone
is_nouser_or_private() helper.  This will be useful for a following
commit.

Move get_mode_access() and maybe_remove() to make them usable by new
code provided by a following commit.

Reviewed-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>
Link: https://lore.kernel.org/r/20220506161102.525323-6-mic@digikod.net
Stable-dep-of: 49440290a093 ("landlock: Handle weird files")
Signed-off-by: Sasha Levin <sashal@kernel.org>
security/landlock/fs.c