diff options
| author | chao liu <liuzgyid@outlook.com> | 2023-06-27 10:03:16 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-09 10:32:38 +0100 |
| commit | 2c9a5607ecbab4b41e8b24eec5c1f6ff2a3b8a8f (patch) | |
| tree | f78c6c3c08c360e3e8123619c5006e9c5b286193 /security | |
| parent | 020002c76147ecfdafe95c44abd3240e216b6316 (diff) | |
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 2fb6a2ea0b99..824859720062 100644 --- a/security/apparmor/capability.c +++ b/security/apparmor/capability.c @@ -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); } |
