Commit 3844cb9b authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

mount: check bondaries in mount_resolve_path

The current code think that /vz/lxc/centos-6-x86_64-root is
in /vz/lxc/centos-6-x86_64.

If the path is not equal to mountpoint, we need to check, that
path contains a slash after mountpoint.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7535c390
......@@ -158,6 +158,8 @@ static struct mount_info *mount_resolve_path(const char *path)
if (strncmp(c->mountpoint, path, min(n, pathlen)))
continue;
if (n < pathlen && path[n] != '/')
continue;
m = c;
break;
......
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