diff options
author | Khadija Kamran <kamrankhadijadj@gmail.com> | 2023-08-23 12:47:56 +0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-09-13 18:13:05 -0400 |
commit | 64fc9526147c7fc14535134d8ea79b9c8dc549a7 (patch) | |
tree | 20aabf4c2f533e7b164f5acab23a9ae40b90b607 /include/linux/security.h | |
parent | 4a00c673068e72c12d243f5c31000246d6984e44 (diff) | |
download | lwn-64fc9526147c7fc14535134d8ea79b9c8dc549a7.tar.gz lwn-64fc9526147c7fc14535134d8ea79b9c8dc549a7.zip |
lsm: constify 'bprm' parameter in security_bprm_committing_creds()
The 'bprm_committing_creds' hook has implementations registered in
SELinux and Apparmor. Looking at the function implementations we observe
that the 'bprm' parameter is not changing.
Mark the 'bprm' parameter of LSM hook security_bprm_committing_creds()
as 'const' since it will not be changing in the LSM hook.
Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r-- | include/linux/security.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index edbea3e0a13f..885053f81019 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -292,7 +292,7 @@ int security_vm_enough_memory_mm(struct mm_struct *mm, long pages); int security_bprm_creds_for_exec(struct linux_binprm *bprm); int security_bprm_creds_from_file(struct linux_binprm *bprm, const struct file *file); int security_bprm_check(struct linux_binprm *bprm); -void security_bprm_committing_creds(struct linux_binprm *bprm); +void security_bprm_committing_creds(const struct linux_binprm *bprm); void security_bprm_committed_creds(struct linux_binprm *bprm); int security_fs_context_submount(struct fs_context *fc, struct super_block *reference); int security_fs_context_dup(struct fs_context *fc, struct fs_context *src_fc); @@ -623,7 +623,7 @@ static inline int security_bprm_check(struct linux_binprm *bprm) return 0; } -static inline void security_bprm_committing_creds(struct linux_binprm *bprm) +static inline void security_bprm_committing_creds(const struct linux_binprm *bprm) { } |