Skip to content

Commit 9b89713

Browse files
chao liujrjohansen
authored andcommitted
apparmor: fix 'Do simple duplicate message elimination'
Multiple profiles shared 'ent->caps', so some logs missed. Fixes: 0ed3b28 ("AppArmor: mediation of non file objects") Signed-off-by: chao liu <[email protected]> Signed-off-by: John Johansen <[email protected]>
1 parent a2081b7 commit 9b89713

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

security/apparmor/capability.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ static int audit_caps(struct apparmor_audit_data *ad, struct aa_profile *profile
9696
return error;
9797
} else {
9898
aa_put_profile(ent->profile);
99+
if (profile != ent->profile)
100+
cap_clear(ent->caps);
99101
ent->profile = aa_get_profile(profile);
100102
cap_raise(ent->caps, cap);
101103
}

0 commit comments

Comments
 (0)