utils: allow cross-device resolution

This is needed to enable containers without a rootfs. Fixes: #3607 Cc: stable-4.0 Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 40281306
...@@ -1082,7 +1082,7 @@ int __safe_mount_beneath_at(int beneath_fd, const char *src, const char *dst, co ...@@ -1082,7 +1082,7 @@ int __safe_mount_beneath_at(int beneath_fd, const char *src, const char *dst, co
__do_close int source_fd = -EBADF, target_fd = -EBADF; __do_close int source_fd = -EBADF, target_fd = -EBADF;
struct lxc_open_how how = { struct lxc_open_how how = {
.flags = O_RDONLY | O_CLOEXEC | O_PATH, .flags = O_RDONLY | O_CLOEXEC | O_PATH,
.resolve = RESOLVE_NO_XDEV | RESOLVE_NO_SYMLINKS | RESOLVE_NO_MAGICLINKS | RESOLVE_BENEATH, .resolve = RESOLVE_NO_SYMLINKS | RESOLVE_NO_MAGICLINKS | RESOLVE_BENEATH,
}; };
int ret; int ret;
char src_buf[LXC_PROC_PID_FD_LEN], tgt_buf[LXC_PROC_PID_FD_LEN]; char src_buf[LXC_PROC_PID_FD_LEN], tgt_buf[LXC_PROC_PID_FD_LEN];
......
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