Commit fe44df2f authored by chao liu's avatar chao liu Committed by Gu Bowen
Browse files

apparmor: fix 'Do simple duplicate message elimination'

mainline inclusion
from mainline-v6.13-rc1
commit 9b897132424fe76bf6c61f22f9cf12af7f1d1e6a
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IBEWQE

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b897132424fe76bf6c61f22f9cf12af7f1d1e6a



--------------------------------

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>
Signed-off-by: default avatarGu Bowen <gubowen5@huawei.com>
parent d87fcf95
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ static int audit_caps(struct common_audit_data *sa, 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);
	}