summaryrefslogtreecommitdiffstats
path: root/security/apparmor/include/policy.h
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2016-06-22 18:01:08 -0700
committerJohn Johansen <john.johansen@canonical.com>2016-07-12 08:43:10 -0700
commit58acf9d911c8831156634a44d0b022d683e1e50c (patch)
treedf76653f50579f989c36eab7139919523f50d561 /security/apparmor/include/policy.h
parent5f20fdfed16bc599a325a145bf0123a8e1c9beea (diff)
downloadblackbird-op-linux-58acf9d911c8831156634a44d0b022d683e1e50c.tar.gz
blackbird-op-linux-58acf9d911c8831156634a44d0b022d683e1e50c.zip
apparmor: fix module parameters can be changed after policy is locked
the policy_lock parameter is a one way switch that prevents policy from being further modified. Unfortunately some of the module parameters can effectively modify policy by turning off enforcement. split policy_admin_capable into a view check and a full admin check, and update the admin check to test the policy_lock parameter. Signed-off-by: John Johansen <john.johansen@canonical.com>
Diffstat (limited to 'security/apparmor/include/policy.h')
-rw-r--r--security/apparmor/include/policy.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index c28b0f20ab53..52275f040a5f 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -403,6 +403,8 @@ static inline int AUDIT_MODE(struct aa_profile *profile)
return profile->audit;
}
+bool policy_view_capable(void);
+bool policy_admin_capable(void);
bool aa_may_manage_policy(int op);
#endif /* __AA_POLICY_H */
OpenPOWER on IntegriCloud