diff options
| author | chao liu <liuzgyid@outlook.com> | 2023-06-27 10:03:16 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-14 19:53:53 +0100 |
| commit | 3ae27e61d15e2444bda15608a543d9f4138966ca (patch) | |
| tree | 623521233a31b082255b0b2a39bc415f5eb003cf /security | |
| parent | 5db93cdacf04d10f81ee42f1614ef01a6cb3f55f (diff) | |
| download | linux-3ae27e61d15e2444bda15608a543d9f4138966ca.tar.gz linux-3ae27e61d15e2444bda15608a543d9f4138966ca.tar.bz2 linux-3ae27e61d15e2444bda15608a543d9f4138966ca.zip | |
apparmor: fix 'Do simple duplicate message elimination'
[ Upstream commit 9b897132424fe76bf6c61f22f9cf12af7f1d1e6a ]
Multiple profiles shared 'ent->caps', so some logs missed.
Fixes: 0ed3b28ab8bf ("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>
Diffstat (limited to 'security')
| -rw-r--r-- | security/apparmor/capability.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/security/apparmor/capability.c b/security/apparmor/capability.c index deccea8654ad..1b13fd89d5a9 100644 --- a/security/apparmor/capability.c +++ b/security/apparmor/capability.c @@ -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); } |
