diff options
author | Khadija Kamran <kamrankhadijadj@gmail.com> | 2023-08-23 13:16:40 +0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-09-14 15:27:29 -0400 |
commit | a721f7b8c3548e943e514a957f2a37f4763b9888 (patch) | |
tree | ab176d981cc00bf0efb733183276c601e4967cfb /security/security.c | |
parent | 64fc9526147c7fc14535134d8ea79b9c8dc549a7 (diff) | |
download | lwn-a721f7b8c3548e943e514a957f2a37f4763b9888.tar.gz lwn-a721f7b8c3548e943e514a957f2a37f4763b9888.zip |
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>
Diffstat (limited to 'security/security.c')
-rw-r--r-- | security/security.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/security.c b/security/security.c index 77a1601ead36..e4aec0f65f75 100644 --- a/security/security.c +++ b/security/security.c @@ -1134,7 +1134,7 @@ void security_bprm_committing_creds(const struct linux_binprm *bprm) * process such as clearing out non-inheritable signal state. This is called * immediately after commit_creds(). */ -void security_bprm_committed_creds(struct linux_binprm *bprm) +void security_bprm_committed_creds(const struct linux_binprm *bprm) { call_void_hook(bprm_committed_creds, bprm); } |