Commit 25aee48b authored by John Johansen's avatar John Johansen Committed by Tim Gardner

UBUNTU: SAUCE: apparmor: fix log of apparmor audit message when kern_path() fails

BugLink: http://bugs.launchpad.net/bugs/1482943

apparmor use kern_path() to lookup the path of the dev_name, and when
this fails apparmor emits a DENIED log message. However for bind and
move mounts the underlying code does a call to kern_path() regardless
of apparmor being present and so has the same failure.

In these cases when kern_path() fails apparmor is not responsible for
the mount failure as the kernel will fail the mount regarless of
apparmor's presence, so just return the error and don't log an apparmor
audit message.
Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 0fe6d20b
......@@ -472,7 +472,7 @@ int aa_move_mount(struct aa_label *label, struct path *path,
buffer, &name, &info,
labels_profile(label)->disconnected);
if (error)
goto error;
goto out;
error = aa_path_name(&old_path, path_flags(labels_profile(label),
&old_path),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment