diff options
author | 2023-08-23 12:47:56 +0500 | |
---|---|---|
committer | 2023-09-13 18:13:05 -0400 | |
commit | 64fc9526147c7fc14535134d8ea79b9c8dc549a7 (patch) | |
tree | 20aabf4c2f533e7b164f5acab23a9ae40b90b607 /security/security.c | |
parent | lsm: constify 'file' parameter in security_bprm_creds_from_file() (diff) | |
download | wireguard-linux-64fc9526147c7fc14535134d8ea79b9c8dc549a7.tar.xz wireguard-linux-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 '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 bde8813e89ff..77a1601ead36 100644 --- a/security/security.c +++ b/security/security.c @@ -1118,7 +1118,7 @@ int security_bprm_check(struct linux_binprm *bprm) * open file descriptors to which access will no longer be granted when the * attributes are changed. This is called immediately before commit_creds(). */ -void security_bprm_committing_creds(struct linux_binprm *bprm) +void security_bprm_committing_creds(const struct linux_binprm *bprm) { call_void_hook(bprm_committing_creds, bprm); } |