Commit 9b897132 authored by chao liu's avatar chao liu Committed by John Johansen
Browse files

apparmor: fix 'Do simple duplicate message elimination'



Multiple profiles shared 'ent->caps', so some logs missed.

Fixes: 0ed3b28a ("AppArmor: mediation of non file objects")
Signed-off-by: default avatarchao liu <liuzgyid@outlook.com>
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
parent a2081b78
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -96,6 +96,8 @@ static int audit_caps(struct apparmor_audit_data *ad, struct aa_profile *profile
		return error;
	} else {
		aa_put_profile(ent->profile);
		if (profile != ent->profile)
			cap_clear(ent->caps);
		ent->profile = aa_get_profile(profile);
		cap_raise(ent->caps, cap);
	}