diff options
author | Khadija Kamran <kamrankhadijadj@gmail.com> | 2023-08-23 12:01:28 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-09-14 22:35:36 +0300 |
commit | 20a2aa47097aae7016209c4dbe392b3b25e0d883 (patch) | |
tree | 4561b3f4cccc30cc03aa1ff16217b3f03b7f6f84 /include/linux/lsm_hook_defs.h | |
parent | a721f7b8c3548e943e514a957f2a37f4763b9888 (diff) | |
download | linux-20a2aa47097aae7016209c4dbe392b3b25e0d883.tar.xz |
lsm: constify 'sb' parameter in security_sb_kern_mount()
The "sb_kern_mount" hook has implementation registered in SELinux.
Looking at the function implementation we observe that the "sb"
parameter is not changing.
Mark the "sb" parameter of LSM hook security_sb_kern_mount() 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 'include/linux/lsm_hook_defs.h')
-rw-r--r-- | include/linux/lsm_hook_defs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h index 3b0f5cfca464..99b8176c3738 100644 --- a/include/linux/lsm_hook_defs.h +++ b/include/linux/lsm_hook_defs.h @@ -66,7 +66,7 @@ LSM_HOOK(void, LSM_RET_VOID, sb_free_mnt_opts, void *mnt_opts) LSM_HOOK(int, 0, sb_eat_lsm_opts, char *orig, void **mnt_opts) LSM_HOOK(int, 0, sb_mnt_opts_compat, struct super_block *sb, void *mnt_opts) LSM_HOOK(int, 0, sb_remount, struct super_block *sb, void *mnt_opts) -LSM_HOOK(int, 0, sb_kern_mount, struct super_block *sb) +LSM_HOOK(int, 0, sb_kern_mount, const struct super_block *sb) LSM_HOOK(int, 0, sb_show_options, struct seq_file *m, struct super_block *sb) LSM_HOOK(int, 0, sb_statfs, struct dentry *dentry) LSM_HOOK(int, 0, sb_mount, const char *dev_name, const struct path *path, |