Skip to content
Commit 24f63b5f authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov
Browse files

mount: open a mount point if it's going to be overmounted



If a mount point has to be bind-mounted to somewhere, we need to have
access to it. This patch solves a problem, when the mount point is
overmounted. In this case we can open the targret mount point and then
use /proc/pid/FD to access it.

v2: make a bind-mount from an underlying mount via a file descriptor
v3: add a separate buffer to generate path to a file descriptor
v4: use the PSFDS contant.

Reported-by: default avatarStanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Cc: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Signed-off-by: default avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: default avatarPavel Emelyanov <xemul@virtuozzo.com>
parent fe5a5ba2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment