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:39:59 +0000 (11:39 +0200)
commita683a0d87a22a924e3040de506f42d8d4842937f
tree1ca700bd30d5fede0534e7901e90c1f5ef00070b
parent31b35b68912326a5afc80bb06a512d45af34f0df
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