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:Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Cc: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com> Signed-off-by:
Andrew Vagin <avagin@virtuozzo.com> Signed-off-by:
Pavel Emelyanov <xemul@virtuozzo.com>
Showing
Please
register
or
sign in
to comment