提交 2d4cee7e 编写于 作者: J Jan Engelhardt 提交者: John Johansen

AppArmor: add const qualifiers to string arrays

Signed-off-by: NJan Engelhardt <jengelh@medozas.de>
Signed-off-by: NJohn Johansen <john.johansen@canonical.com>
上级 ad5ff3db
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "include/audit.h" #include "include/audit.h"
#include "include/policy.h" #include "include/policy.h"
const char *op_table[] = { const char *const op_table[] = {
"null", "null",
"sysctl", "sysctl",
...@@ -73,7 +73,7 @@ const char *op_table[] = { ...@@ -73,7 +73,7 @@ const char *op_table[] = {
"profile_remove" "profile_remove"
}; };
const char *audit_mode_names[] = { const char *const audit_mode_names[] = {
"normal", "normal",
"quiet_denied", "quiet_denied",
"quiet", "quiet",
...@@ -81,7 +81,7 @@ const char *audit_mode_names[] = { ...@@ -81,7 +81,7 @@ const char *audit_mode_names[] = {
"all" "all"
}; };
static char *aa_audit_type[] = { static const char *const aa_audit_type[] = {
"AUDIT", "AUDIT",
"ALLOWED", "ALLOWED",
"DENIED", "DENIED",
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
struct aa_profile; struct aa_profile;
extern const char *audit_mode_names[]; extern const char *const audit_mode_names[];
#define AUDIT_MAX_INDEX 5 #define AUDIT_MAX_INDEX 5
enum audit_mode { enum audit_mode {
...@@ -47,7 +47,7 @@ enum audit_type { ...@@ -47,7 +47,7 @@ enum audit_type {
AUDIT_APPARMOR_AUTO AUDIT_APPARMOR_AUTO
}; };
extern const char *op_table[]; extern const char *const op_table[];
enum aa_ops { enum aa_ops {
OP_NULL, OP_NULL,
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "file.h" #include "file.h"
#include "resource.h" #include "resource.h"
extern const char *profile_mode_names[]; extern const char *const profile_mode_names[];
#define APPARMOR_NAMES_MAX_INDEX 3 #define APPARMOR_NAMES_MAX_INDEX 3
#define COMPLAIN_MODE(_profile) \ #define COMPLAIN_MODE(_profile) \
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
/* root profile namespace */ /* root profile namespace */
struct aa_namespace *root_ns; struct aa_namespace *root_ns;
const char *profile_mode_names[] = { const char *const profile_mode_names[] = {
"enforce", "enforce",
"complain", "complain",
"kill", "kill",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册