lsm: constify 'bprm' parameter in security_bprm_committed_creds()
authorKhadija Kamran <kamrankhadijadj@gmail.com>
Wed, 23 Aug 2023 08:16:40 +0000 (13:16 +0500)
committerPaul Moore <paul@paul-moore.com>
Thu, 14 Sep 2023 19:27:29 +0000 (15:27 -0400)
commita721f7b8c3548e943e514a957f2a37f4763b9888
treeab176d981cc00bf0efb733183276c601e4967cfb
parent64fc9526147c7fc14535134d8ea79b9c8dc549a7
lsm: constify 'bprm' parameter in security_bprm_committed_creds()

Three LSMs register the implementations for the 'bprm_committed_creds()'
hook: AppArmor, SELinux and tomoyo. Looking at the function
implementations we may observe that the 'bprm' parameter is not changing.

Mark the 'bprm' parameter of LSM hook security_bprm_committed_creds() as
'const' since it will not be changing in the LSM hook.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
[PM: minor merge fuzzing due to other constification patches]
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/linux/lsm_hook_defs.h
include/linux/security.h
security/apparmor/lsm.c
security/security.c
security/selinux/hooks.c
security/tomoyo/tomoyo.c