summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJohn Johansen <john.johansen@canonical.com>2021-04-29 01:48:28 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 11:15:35 +0200
commit2b426e32c8039cc14a6cce84f376901c2b91637e (patch)
tree7a162e9d1afa80bb1c2d773b6750fe58ab7bd8c6 /security
parentc3b9b93d9b292e13d9c3a39287ccc1320d39f630 (diff)
downloadlinux-stable-2b426e32c8039cc14a6cce84f376901c2b91637e.tar.gz
linux-stable-2b426e32c8039cc14a6cce84f376901c2b91637e.tar.bz2
linux-stable-2b426e32c8039cc14a6cce84f376901c2b91637e.zip
apparmor: fix quiet_denied for file rules
commit 68ff8540cc9e4ab557065b3f635c1ff4c96e1f1c upstream. Global quieting of denied AppArmor generated file events is not handled correctly. Unfortunately the is checking if quieting of all audit events is set instead of just denied events. Fixes: 67012e8209df ("AppArmor: basic auditing infrastructure.") Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'security')
-rw-r--r--security/apparmor/audit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/apparmor/audit.c b/security/apparmor/audit.c
index 70b9730c0be6..86ce3ec18a8a 100644
--- a/security/apparmor/audit.c
+++ b/security/apparmor/audit.c
@@ -143,7 +143,7 @@ int aa_audit(int type, struct aa_profile *profile, struct common_audit_data *sa,
}
if (AUDIT_MODE(profile) == AUDIT_QUIET ||
(type == AUDIT_APPARMOR_DENIED &&
- AUDIT_MODE(profile) == AUDIT_QUIET))
+ AUDIT_MODE(profile) == AUDIT_QUIET_DENIED))
return aad(sa)->error;
if (KILL_MODE(profile) && type == AUDIT_APPARMOR_DENIED)