[PATCH] lsm: constify the 'file' parameter in security_binder_transfer_file()

Paul Moore paul at paul-moore.com
Tue Aug 15 20:04:33 UTC 2023


On Aug 12, 2023 Khadija Kamran <kamrankhadijadj at gmail.com> wrote:
> 
> SELinux registers the implementation for the "binder_transfer_file"
> hook. Looking at the function implementation we observe that the
> parameter "file" is not changing.
> 
> Mark the "file" parameter of LSM hook security_binder_transfer_file() as
> "const" since it will not be changing in the LSM hook.
> 
> Signed-off-by: Khadija Kamran <kamrankhadijadj at gmail.com>
> ---
>  include/linux/lsm_hook_defs.h | 2 +-
>  include/linux/security.h      | 4 ++--
>  security/security.c           | 2 +-
>  security/selinux/hooks.c      | 8 ++++----
>  4 files changed, 8 insertions(+), 8 deletions(-)

Looks good to me, merged into lsm/next, thanks!

--
paul-moore.com



More information about the Linux-security-module-archive mailing list