summaryrefslogtreecommitdiff
path: root/security/apparmor/include/policy.h
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor/include/policy.h')
-rw-r--r--security/apparmor/include/policy.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h
index 0dec18cd95e5..9bafeb3847d5 100644
--- a/security/apparmor/include/policy.h
+++ b/security/apparmor/include/policy.h
@@ -75,13 +75,21 @@ enum profile_mode {
* start: set of start states for the different classes of data
*/
struct aa_policydb {
- /* Generic policy DFA specific rule types will be subsections of it */
struct aa_dfa *dfa;
struct aa_perms *perms;
+ struct aa_domain trans;
unsigned int start[AA_CLASS_LAST + 1];
-
};
+static inline void aa_destroy_policydb(struct aa_policydb *policy)
+{
+ aa_put_dfa(policy->dfa);
+ if (policy->perms)
+ kvfree(policy->perms);
+ aa_free_domain_entries(&policy->trans);
+
+}
+
/* struct aa_data - generic data structure
* key: name for retrieving this data
* size: size of data in bytes
@@ -151,7 +159,7 @@ struct aa_profile {
int size;
struct aa_policydb policy;
- struct aa_file_rules file;
+ struct aa_policydb file;
struct aa_caps caps;
int xattr_count;