apparmor: Fix failed mount permission check error message
authorJohn Johansen <john.johansen@canonical.com>
Tue, 25 Jan 2022 08:37:42 +0000 (00:37 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Aug 2022 09:11:31 +0000 (11:11 +0200)
commit1fff357ea6bb13038e1a197d4e561eece176d574
tree63e393fb5316aeeb8cb39a1247ef582a4f06c58e
parent0828d1db5bbc9b8de172f5028562b323fbc4db23
apparmor: Fix failed mount permission check error message

commit ec240b5905bbb09a03dccffee03062cf39e38dc2 upstream.

When the mount check fails due to a permission check failure instead
of explicitly at one of the subcomponent checks, AppArmor is reporting
a failure in the flags match. However this is not true and AppArmor
can not attribute the error at this point to any particular component,
and should only indicate the mount failed due to missing permissions.

Fixes: 2ea3ffb7782a ("apparmor: add mount mediation")
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
security/apparmor/mount.c