Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28042fab authored by John Johansen's avatar John Johansen
Browse files

AppArmor: Fix the error case for chroot relative path name lookup



When a chroot relative pathname lookup fails it is falling through to
do a d_absolute_path lookup.  This is incorrect as d_absolute_path should
only be used to lookup names for namespace absolute paths.

Signed-off-by: default avatarJohn Johansen <john.johansen@canonical.com>
Acked-by: default avatarKees Cook <kees@ubuntu.com>
parent 38305a4b
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -91,8 +91,7 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
		}
		path_put(&root);
		connected = 0;
	}

	} else
		res = d_absolute_path(path, buf, buflen);

	*name = res;