diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-05-02 17:43:38 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-05-03 22:53:49 +0300 |
commit | ded34574d4d351ab0ca095a45496b393cef611c2 (patch) | |
tree | 6884a97c4ba2c10ad542db83cfbd8afeab326895 /security/selinux/include/initial_sid_to_string.h | |
parent | a9029d97045468bc25281971d452b6cecf009553 (diff) | |
download | linux-ded34574d4d351ab0ca095a45496b393cef611c2.tar.xz |
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/initial_sid_to_string.h')
-rw-r--r-- | security/selinux/include/initial_sid_to_string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/include/initial_sid_to_string.h b/security/selinux/include/initial_sid_to_string.h index 9683f0ddecbc..60820517aa43 100644 --- a/security/selinux/include/initial_sid_to_string.h +++ b/security/selinux/include/initial_sid_to_string.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0 */ -static const char *initial_sid_to_string[] = { +static const char *const initial_sid_to_string[] = { NULL, "kernel", "security", |