Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

apparmor: Document that label must be last member in struct aa_profile

The label struct is variable length. While its use in struct aa_profile
is fixed length at 2 entries the variable length member needs to be
the last member in the structure.

The code already does this but the comment has it in the wrong location.
Also add a comment to ensure it stays at the end of the structure.

While we are at it, update the documentation for other profile members
as well.

Signed-off-by: John Johansen <john.johansen@canonical.com>

+8 -1
+8 -1
security/apparmor/include/policy.h
··· 198 198 199 199 /* struct aa_profile - basic confinement data 200 200 * @base - base components of the profile (name, refcount, lists, lock ...) 201 - * @label - label this profile is an extension of 202 201 * @parent: parent of profile 203 202 * @ns: namespace the profile is in 204 203 * @rename: optional profile name that this profile renamed ··· 205 206 * @audit: the auditing mode of the profile 206 207 * @mode: the enforcement mode of the profile 207 208 * @path_flags: flags controlling path generation behavior 209 + * @signal: the signal that should be used when kill is used 208 210 * @disconnected: what to prepend if attach_disconnected is specified 209 211 * @attach: attachment rules for the profile 210 212 * @rules: rules to be enforced 211 213 * 214 + * learning_cache: the accesses learned in complain mode 215 + * raw_data: rawdata of the loaded profile policy 216 + * hash: cryptographic hash of the profile 212 217 * @dents: dentries for the profiles file entries in apparmorfs 213 218 * @dirname: name of the profile dir in apparmorfs 219 + * @dents: set of dentries associated with the profile 214 220 * @data: hashtable for free-form policy aa_data 221 + * @label - label this profile is an extension of 215 222 * 216 223 * The AppArmor profile contains the basic confinement data. Each profile 217 224 * has a name, and exists in a namespace. The @name and @exec_match are ··· 252 247 char *dirname; 253 248 struct dentry *dents[AAFS_PROF_SIZEOF]; 254 249 struct rhashtable *data; 250 + 251 + /* special - variable length must be last entry in profile */ 255 252 struct aa_label label; 256 253 }; 257 254