summaryrefslogtreecommitdiff
path: root/security/selinux/ima.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2022-03-01 20:39:20 +0300
committerPaul Moore <paul@paul-moore.com>2022-03-02 19:37:03 +0300
commitcdbec3ede0b8cb318c36f5cc945b9360329cbd25 (patch)
tree779484bf8cd18ab49ec73a481f91b7178d0cb76d /security/selinux/ima.c
parent70868c6b8fd80db585da57a264c50a69af8fd3c3 (diff)
downloadlinux-cdbec3ede0b8cb318c36f5cc945b9360329cbd25.tar.xz
selinux: shorten the policy capability enum names
The SELinux policy capability enum names are rather long and follow the "POLICYDB_CAPABILITY_XXX format". While the "POLICYDB_" prefix is helpful in tying the enums to other SELinux policy constants, macros, etc. there is no reason why we need to spell out "CAPABILITY" completely. Shorten "CAPABILITY" to "CAP" in order to make things a bit shorter and cleaner. Moving forward, the SELinux policy capability enum names should follow the "POLICYDB_CAP_XXX" format. Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ima.c')
-rw-r--r--security/selinux/ima.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/ima.c b/security/selinux/ima.c
index 727c4e43219d..fded01981a39 100644
--- a/security/selinux/ima.c
+++ b/security/selinux/ima.c
@@ -29,7 +29,7 @@ static char *selinux_ima_collect_state(struct selinux_state *state)
buf_len = strlen("initialized=0;enforcing=0;checkreqprot=0;") + 1;
len = strlen(on);
- for (i = 0; i < __POLICYDB_CAPABILITY_MAX; i++)
+ for (i = 0; i < __POLICYDB_CAP_MAX; i++)
buf_len += strlen(selinux_policycap_names[i]) + len;
buf = kzalloc(buf_len, GFP_KERNEL);
@@ -54,7 +54,7 @@ static char *selinux_ima_collect_state(struct selinux_state *state)
rc = strlcat(buf, checkreqprot_get(state) ? on : off, buf_len);
WARN_ON(rc >= buf_len);
- for (i = 0; i < __POLICYDB_CAPABILITY_MAX; i++) {
+ for (i = 0; i < __POLICYDB_CAP_MAX; i++) {
rc = strlcat(buf, selinux_policycap_names[i], buf_len);
WARN_ON(rc >= buf_len);