summaryrefslogtreecommitdiff
path: root/security/security.c
diff options
context:
space:
mode:
authorKhadija Kamran <kamrankhadijadj@gmail.com>2023-08-12 20:31:08 +0500
committerPaul Moore <paul@paul-moore.com>2023-08-15 16:04:34 -0400
commit8e4672d6f902d5c4db1e87e8aa9f530149d85bc6 (patch)
tree8b2450fcb8a618c672456e1b90801b3f8ebf1e09 /security/security.c
parent6672efbb685f7c9c9df005beb839e1942fd6b34e (diff)
lsm: constify the 'file' parameter in security_binder_transfer_file()
SELinux registers the implementation for the "binder_transfer_file" hook. Looking at the function implementation we observe that the parameter "file" is not changing. Mark the "file" parameter of LSM hook security_binder_transfer_file() as "const" since it will not be changing in the LSM hook. Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com> [PM: subject line whitespace fix] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/security.c')
-rw-r--r--security/security.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/security.c b/security/security.c
index 6962ea38a98f..96f2c68a1571 100644
--- a/security/security.c
+++ b/security/security.c
@@ -841,7 +841,7 @@ int security_binder_transfer_binder(const struct cred *from,
* Return: Returns 0 if permission is granted.
*/
int security_binder_transfer_file(const struct cred *from,
- const struct cred *to, struct file *file)
+ const struct cred *to, const struct file *file)
{
return call_int_hook(binder_transfer_file, 0, from, to, file);
}