diff options
author | John Johansen <john.johansen@canonical.com> | 2017-01-16 00:43:01 -0800 |
---|---|---|
committer | John Johansen <john.johansen@canonical.com> | 2017-01-16 01:18:46 -0800 |
commit | 47f6e5cc7355e4ff2fd7ace919aa9e291077c26b (patch) | |
tree | 28afc953505fa769dafd1532b141a779b80672b9 /security/apparmor/include/policy.h | |
parent | 55a26ebf630b6bf1cb7ddf8882fdc81d58afeaa2 (diff) | |
download | linux-47f6e5cc7355e4ff2fd7ace919aa9e291077c26b.tar.gz linux-47f6e5cc7355e4ff2fd7ace919aa9e291077c26b.tar.bz2 linux-47f6e5cc7355e4ff2fd7ace919aa9e291077c26b.zip |
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/include/policy.h')
-rw-r--r-- | security/apparmor/include/policy.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h index b315ad5bdd85..a5a997896836 100644 --- a/security/apparmor/include/policy.h +++ b/security/apparmor/include/policy.h @@ -303,6 +303,7 @@ static inline int AUDIT_MODE(struct aa_profile *profile) bool policy_view_capable(struct aa_ns *ns); bool policy_admin_capable(struct aa_ns *ns); -int aa_may_manage_policy(struct aa_profile *profile, struct aa_ns *ns, int op); +int aa_may_manage_policy(struct aa_profile *profile, struct aa_ns *ns, + const char *op); #endif /* __AA_POLICY_H */ |