apparmor: fix 'Do simple duplicate message elimination'
[ Upstream commit 9b897132424fe76bf6c61f22f9cf12af7f1d1e6a ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
d6de1aaa0f
commit
2c312ab8f2
1 changed files with 2 additions and 0 deletions
|
|
@ -94,6 +94,8 @@ static int audit_caps(struct common_audit_data *sa, 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…
Add table
Reference in a new issue