diff options
author | Khadija Kamran <kamrankhadijadj@gmail.com> | 2023-08-23 08:44:41 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-09-13 23:57:01 +0200 |
commit | 25cc71d1527b55c880d333e7cc1dc37aeef9843f (patch) | |
tree | 3e59f618d4b8363bb20dea07c9c496f927197582 /security/security.c | |
parent | Linux 6.6-rc1 (diff) | |
download | linux-25cc71d1527b55c880d333e7cc1dc37aeef9843f.tar.xz linux-25cc71d1527b55c880d333e7cc1dc37aeef9843f.zip |
lsm: constify 'sb' parameter in security_quotactl()
SELinux registers the implementation for the "quotactl" hook. Looking at
the function implementation we observe that the parameter "sb" is not
changing.
Mark the "sb" parameter of LSM hook security_quotactl() 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 23b129d482a7..b944b19e4512 100644 --- a/security/security.c +++ b/security/security.c @@ -957,7 +957,7 @@ int security_capable(const struct cred *cred, * * Return: Returns 0 if permission is granted. */ -int security_quotactl(int cmds, int type, int id, struct super_block *sb) +int security_quotactl(int cmds, int type, int id, const struct super_block *sb) { return call_int_hook(quotactl, 0, cmds, type, id, sb); } |