AppArmor: add const qualifiers to string arrays
authorJan Engelhardt <jengelh@medozas.de>
Wed, 14 Mar 2012 12:30:36 +0000 (13:30 +0100)
committerJohn Johansen <john.johansen@canonical.com>
Thu, 15 Mar 2012 02:09:13 +0000 (19:09 -0700)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: John Johansen <john.johansen@canonical.com>

security/apparmor/audit.c
security/apparmor/include/audit.h
security/apparmor/include/policy.h
security/apparmor/policy.c

index 61344b5..5ff6777 100644 (file)
@@ -19,7 +19,7 @@
 #include "include/audit.h"
 #include "include/policy.h"
 
-const char *op_table[] = {
+const char *const op_table[] = {
        "null",
 
        "sysctl",
@@ -73,7 +73,7 @@ const char *op_table[] = {
        "profile_remove"
 };
 
-const char *audit_mode_names[] = {
+const char *const audit_mode_names[] = {
        "normal",
        "quiet_denied",
        "quiet",
@@ -81,7 +81,7 @@ const char *audit_mode_names[] = {
        "all"
 };
 
-static char *aa_audit_type[] = {
+static const char *const aa_audit_type[] = {
        "AUDIT",
        "ALLOWED",
        "DENIED",
index 9317cd8..4ba78c2 100644 (file)
@@ -25,7 +25,7 @@
 
 struct aa_profile;
 
-extern const char *audit_mode_names[];
+extern const char *const audit_mode_names[];
 #define AUDIT_MAX_INDEX 5
 
 enum audit_mode {
@@ -47,7 +47,7 @@ enum audit_type {
        AUDIT_APPARMOR_AUTO
 };
 
-extern const char *op_table[];
+extern const char *const op_table[];
 enum aa_ops {
        OP_NULL,
 
index 9e18e96..bda4569 100644 (file)
@@ -29,7 +29,7 @@
 #include "file.h"
 #include "resource.h"
 
-extern const char *profile_mode_names[];
+extern const char *const profile_mode_names[];
 #define APPARMOR_NAMES_MAX_INDEX 3
 
 #define COMPLAIN_MODE(_profile)        \
index 73288d0..9064143 100644 (file)
@@ -93,7 +93,7 @@
 /* root profile namespace */
 struct aa_namespace *root_ns;
 
-const char *profile_mode_names[] = {
+const char *const profile_mode_names[] = {
        "enforce",
        "complain",
        "kill",