diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-05-02 16:43:38 +0200 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-05-03 21:53:49 +0200 |
commit | ded34574d4d351ab0ca095a45496b393cef611c2 (patch) | |
tree | 6884a97c4ba2c10ad542db83cfbd8afeab326895 /security/selinux/include/policycap_names.h | |
parent | selinux: fix indentation level of mls_ops block (diff) | |
download | linux-ded34574d4d351ab0ca095a45496b393cef611c2.tar.xz linux-ded34574d4d351ab0ca095a45496b393cef611c2.zip |
selinux: declare data arrays const
The arrays for the policy capability names, the initial sid identifiers
and the class and permission names are not changed at runtime. Declare
them const to avoid accidental modification.
Do not override the classmap and the initial sid list in the build time
script genheaders.
Check flose(3) is successful in genheaders.c, otherwise the written data
might be corrupted or incomplete.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: manual merge due to fuzz, minor style tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/include/policycap_names.h')
-rw-r--r-- | security/selinux/include/policycap_names.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/include/policycap_names.h b/security/selinux/include/policycap_names.h index 100da7d043db..2a87fc3702b8 100644 --- a/security/selinux/include/policycap_names.h +++ b/security/selinux/include/policycap_names.h @@ -5,7 +5,7 @@ #include "policycap.h" /* Policy capability names */ -const char *selinux_policycap_names[__POLICYDB_CAP_MAX] = { +const char *const selinux_policycap_names[__POLICYDB_CAP_MAX] = { "network_peer_controls", "open_perms", "extended_socket_class", |