[PATCH v8 1/9] security: Create file_truncate hook from path_truncate hook
Paul Moore
paul at paul-moore.com
Thu Oct 6 01:10:46 UTC 2022
On Sat, Oct 1, 2022 at 11:49 AM Günther Noack <gnoack3000 at gmail.com> wrote:
>
> Like path_truncate, the file_truncate hook also restricts file
> truncation, but is called in the cases where truncation is attempted
> on an already-opened file.
>
> This is required in a subsequent commit to handle ftruncate()
> operations differently to truncate() operations.
>
> Acked-by: Tetsuo Handa <penguin-kernel at I-love.SAKURA.ne.jp>
> Acked-by: John Johansen <john.johansen at canonical.com>
> Signed-off-by: Günther Noack <gnoack3000 at gmail.com>
> ---
> fs/namei.c | 2 +-
> fs/open.c | 2 +-
> include/linux/lsm_hook_defs.h | 1 +
> include/linux/lsm_hooks.h | 10 +++++++++-
> include/linux/security.h | 6 ++++++
> security/apparmor/lsm.c | 6 ++++++
> security/security.c | 5 +++++
> security/tomoyo/tomoyo.c | 13 +++++++++++++
> 8 files changed, 42 insertions(+), 3 deletions(-)
I agree with Mickaël's comments regarding the formatting, but
otherwise it looks okay to me from a LSM perspective. If you make the
whitespace changes you can add my ACK.
Acked-by: Paul Moore <paul at paul-moore.com>
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list