From: Christian Brauner Date: Sun, 27 Dec 2020 10:19:51 +0000 (+0100) Subject: utils: allow cross-device resolution X-Git-Tag: lxc-5.0.0~326^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1c9193cfc89d2d126c31f5797b18a89413b1042;p=thirdparty%2Flxc.git utils: allow cross-device resolution This is needed to enable containers without a rootfs. Fixes: #3607 Cc: stable-4.0 Signed-off-by: Christian Brauner --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index 243dfd33d..c4815d14c 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -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; struct lxc_open_how how = { .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; char src_buf[LXC_PROC_PID_FD_LEN], tgt_buf[LXC_PROC_PID_FD_LEN];