diff options
author | Khadija Kamran <kamrankhadijadj@gmail.com> | 2023-08-23 10:16:40 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-09-14 21:27:29 +0200 |
commit | a721f7b8c3548e943e514a957f2a37f4763b9888 (patch) | |
tree | ab176d981cc00bf0efb733183276c601e4967cfb /security/apparmor | |
parent | lsm: constify 'bprm' parameter in security_bprm_committing_creds() (diff) | |
download | linux-a721f7b8c3548e943e514a957f2a37f4763b9888.tar.xz linux-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/apparmor')
-rw-r--r-- | security/apparmor/lsm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/lsm.c b/security/apparmor/lsm.c index b03f46e0f6c5..3fa325d5efac 100644 --- a/security/apparmor/lsm.c +++ b/security/apparmor/lsm.c @@ -756,7 +756,7 @@ static void apparmor_bprm_committing_creds(const struct linux_binprm *bprm) * apparmor_bprm_committed_creds() - do cleanup after new creds committed * @bprm: binprm for the exec (NOT NULL) */ -static void apparmor_bprm_committed_creds(struct linux_binprm *bprm) +static void apparmor_bprm_committed_creds(const struct linux_binprm *bprm) { /* clear out temporary/transitional state from the context */ aa_clear_task_ctx_trans(task_ctx(current)); |