Re: [PATCH] lsm: constify 'bprm' parameter in security_bprm_committed_creds()
From: Paul Moore <paul@paul-moore.com>
Date: 2023-09-14 19:27:33
Also in:
lkml, selinux
From: Paul Moore <paul@paul-moore.com>
Date: 2023-09-14 19:27:33
Also in:
lkml, selinux
On Aug 23, 2023 Khadija Kamran [off-list ref] wrote:
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 <redacted> --- include/linux/lsm_hook_defs.h | 2 +- include/linux/security.h | 4 ++-- security/apparmor/lsm.c | 2 +- security/security.c | 2 +- security/selinux/hooks.c | 2 +- security/tomoyo/tomoyo.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-)
Merged into lsm/next, thanks! -- paul-moore.com