diff options
Diffstat (limited to 'security/apparmor/include')
| -rw-r--r-- | security/apparmor/include/apparmor.h | 13 | ||||
| -rw-r--r-- | security/apparmor/include/policy.h | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/security/apparmor/include/apparmor.h b/security/apparmor/include/apparmor.h index 248c408ddc1b..40aedd9f73ea 100644 --- a/security/apparmor/include/apparmor.h +++ b/security/apparmor/include/apparmor.h | |||
| @@ -19,6 +19,19 @@ | |||
| 19 | 19 | ||
| 20 | #include "match.h" | 20 | #include "match.h" |
| 21 | 21 | ||
| 22 | /* | ||
| 23 | * Class of mediation types in the AppArmor policy db | ||
| 24 | */ | ||
| 25 | #define AA_CLASS_ENTRY 0 | ||
| 26 | #define AA_CLASS_UNKNOWN 1 | ||
| 27 | #define AA_CLASS_FILE 2 | ||
| 28 | #define AA_CLASS_CAP 3 | ||
| 29 | #define AA_CLASS_NET 4 | ||
| 30 | #define AA_CLASS_RLIMITS 5 | ||
| 31 | #define AA_CLASS_DOMAIN 6 | ||
| 32 | |||
| 33 | #define AA_CLASS_LAST AA_CLASS_DOMAIN | ||
| 34 | |||
| 22 | /* Control parameters settable through module/boot flags */ | 35 | /* Control parameters settable through module/boot flags */ |
| 23 | extern enum audit_mode aa_g_audit; | 36 | extern enum audit_mode aa_g_audit; |
| 24 | extern bool aa_g_audit_header; | 37 | extern bool aa_g_audit_header; |
diff --git a/security/apparmor/include/policy.h b/security/apparmor/include/policy.h index aeda5cf56904..9e18e9609e24 100644 --- a/security/apparmor/include/policy.h +++ b/security/apparmor/include/policy.h | |||
| @@ -129,6 +129,17 @@ struct aa_namespace { | |||
| 129 | struct list_head sub_ns; | 129 | struct list_head sub_ns; |
| 130 | }; | 130 | }; |
| 131 | 131 | ||
| 132 | /* struct aa_policydb - match engine for a policy | ||
| 133 | * dfa: dfa pattern match | ||
| 134 | * start: set of start states for the different classes of data | ||
| 135 | */ | ||
| 136 | struct aa_policydb { | ||
| 137 | /* Generic policy DFA specific rule types will be subsections of it */ | ||
| 138 | struct aa_dfa *dfa; | ||
| 139 | unsigned int start[AA_CLASS_LAST + 1]; | ||
| 140 | |||
| 141 | }; | ||
| 142 | |||
| 132 | /* struct aa_profile - basic confinement data | 143 | /* struct aa_profile - basic confinement data |
| 133 | * @base - base components of the profile (name, refcount, lists, lock ...) | 144 | * @base - base components of the profile (name, refcount, lists, lock ...) |
| 134 | * @parent: parent of profile | 145 | * @parent: parent of profile |
| @@ -143,6 +154,7 @@ struct aa_namespace { | |||
| 143 | * @flags: flags controlling profile behavior | 154 | * @flags: flags controlling profile behavior |
| 144 | * @path_flags: flags controlling path generation behavior | 155 | * @path_flags: flags controlling path generation behavior |
| 145 | * @size: the memory consumed by this profiles rules | 156 | * @size: the memory consumed by this profiles rules |
| 157 | * @policy: general match rules governing policy | ||
| 146 | * @file: The set of rules governing basic file access and domain transitions | 158 | * @file: The set of rules governing basic file access and domain transitions |
| 147 | * @caps: capabilities for the profile | 159 | * @caps: capabilities for the profile |
| 148 | * @rlimits: rlimits for the profile | 160 | * @rlimits: rlimits for the profile |
| @@ -179,6 +191,7 @@ struct aa_profile { | |||
| 179 | u32 path_flags; | 191 | u32 path_flags; |
| 180 | int size; | 192 | int size; |
| 181 | 193 | ||
| 194 | struct aa_policydb policy; | ||
| 182 | struct aa_file_rules file; | 195 | struct aa_file_rules file; |
| 183 | struct aa_caps caps; | 196 | struct aa_caps caps; |
| 184 | struct aa_rlimit rlimits; | 197 | struct aa_rlimit rlimits; |
