diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2023-04-20 17:05:03 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-05-08 16:52:05 -0400 |
commit | 4158cb600006371f4359f6ef23a0f1a7255e8843 (patch) | |
tree | d78a92aab13b4e457277331888b655cb86f07953 /security/selinux/selinuxfs.c | |
parent | 4595ae8c4a10a005a24c0994b710c9575f5b46b9 (diff) |
selinux: declare read-only data arrays const
The array of mount tokens in only used in match_opt_prefix() and never
modified.
The array of symtab names is never modified and only used in the
DEBUG_HASHES configuration as output.
The array of files for the SElinux filesystem sub-directory `ss` is
similar to the other `struct tree_descr` usages only read from to
construct the containing entries.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r-- | security/selinux/selinuxfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c index 7cc7e2f0272b..bad1f6b685fd 100644 --- a/security/selinux/selinuxfs.c +++ b/security/selinux/selinuxfs.c @@ -1649,7 +1649,7 @@ static int sel_make_ss_files(struct dentry *dir) struct super_block *sb = dir->d_sb; struct selinux_fs_info *fsi = sb->s_fs_info; int i; - static struct tree_descr files[] = { + static const struct tree_descr files[] = { { "sidtab_hash_stats", &sel_sidtab_hash_stats_ops, S_IRUGO }, }; |