mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 16:52:18 +00:00
apparmor: document first entry is in packed perms struct is reserved
Add a comment to unpack_perm to document the first entry in the packed perms struct is reserved, and make a non-functional change of unpacking to a temporary stack variable named "reserved" to help suppor the documentation of which value is reserved. Suggested-by: Serge E. Hallyn <serge@hallyn.com> Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
7290f59231
commit
a2081b78e2
@ -645,10 +645,13 @@ static bool unpack_rlimits(struct aa_ext *e, struct aa_ruleset *rules)
|
||||
|
||||
static bool unpack_perm(struct aa_ext *e, u32 version, struct aa_perms *perm)
|
||||
{
|
||||
u32 reserved;
|
||||
|
||||
if (version != 1)
|
||||
return false;
|
||||
|
||||
return aa_unpack_u32(e, &perm->allow, NULL) &&
|
||||
/* reserved entry is for later expansion, discard for now */
|
||||
return aa_unpack_u32(e, &reserved, NULL) &&
|
||||
aa_unpack_u32(e, &perm->allow, NULL) &&
|
||||
aa_unpack_u32(e, &perm->deny, NULL) &&
|
||||
aa_unpack_u32(e, &perm->subtree, NULL) &&
|
||||
|
Loading…
Reference in New Issue
Block a user