summaryrefslogtreecommitdiff
path: root/security/apparmor/domain.c
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2017-01-16 00:43:01 -0800
committerJohn Johansen <john.johansen@canonical.com>2017-01-16 01:18:46 -0800
commit47f6e5cc7355e4ff2fd7ace919aa9e291077c26b (patch)
tree28afc953505fa769dafd1532b141a779b80672b9 /security/apparmor/domain.c
parent55a26ebf630b6bf1cb7ddf8882fdc81d58afeaa2 (diff)
apparmor: change op from int to const char *
Having ops be an integer that is an index into an op name table is awkward and brittle. Every op change requires an edit for both the op constant and a string in the table. Instead switch to using const strings directly, eliminating the need for the table that needs to be kept in sync. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/domain.c')
-rw-r--r--security/apparmor/domain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c
index 84856b7bbee1..c2f1d651db23 100644
--- a/security/apparmor/domain.c
+++ b/security/apparmor/domain.c
@@ -750,8 +750,8 @@ int aa_change_profile(const char *ns_name, const char *hname, bool onexec,
struct aa_profile *profile, *target = NULL;
struct aa_ns *ns = NULL;
struct file_perms perms = {};
- const char *name = NULL, *info = NULL;
- int op, error = 0;
+ const char *name = NULL, *info = NULL, *op;
+ int error = 0;
u32 request;
if (!hname && !ns_name)