mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-04 04:06:26 +00:00
apparmor: fix 'Do simple duplicate message elimination'
Multiple profiles shared 'ent->caps', so some logs missed.
Fixes: 0ed3b28ab8
("AppArmor: mediation of non file objects")
Signed-off-by: chao liu <liuzgyid@outlook.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
a2081b78e2
commit
9b89713242
@ -96,6 +96,8 @@ static int audit_caps(struct apparmor_audit_data *ad, struct aa_profile *profile
|
|||||||
return error;
|
return error;
|
||||||
} else {
|
} else {
|
||||||
aa_put_profile(ent->profile);
|
aa_put_profile(ent->profile);
|
||||||
|
if (profile != ent->profile)
|
||||||
|
cap_clear(ent->caps);
|
||||||
ent->profile = aa_get_profile(profile);
|
ent->profile = aa_get_profile(profile);
|
||||||
cap_raise(ent->caps, cap);
|
cap_raise(ent->caps, cap);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user