]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fs: move should_remove_suid()
authorAmir Goldstein <amir73il@gmail.com>
Sat, 18 Mar 2023 10:15:25 +0000 (12:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:30:07 +0000 (13:30 +0100)
commitbaea3ae425fb3d65a3aef15e58724e717a746a0b
tree894c732419356fb13031a0cdb3af343e914f3109
parent24378d6f748649060f4d0c3eea8a1efe5bccfd1d
fs: move should_remove_suid()

commit e243e3f94c804ecca9a8241b5babe28f35258ef4 upstream.

Move the helper from inode.c to attr.c. This keeps the the core of the
set{g,u}id stripping logic in one place when we add follow-up changes.
It is the better place anyway, since should_remove_suid() returns
ATTR_KILL_S{G,U}ID flags.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/attr.c
fs/inode.c