From: Christian Brauner Date: Wed, 14 Sep 2022 14:21:20 +0000 (+0200) Subject: conf: allow cross-device links X-Git-Tag: v6.0.0~96^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a66dabf86ed1a0f210a23371126f27df6929eb7;p=thirdparty%2Flxc.git conf: allow cross-device links Fixes: https://github.com/lxc/lxd/issues/10914 Signed-off-by: Christian Brauner (Microsoft) --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index a04bb0de8..bc1b25464 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -3041,7 +3041,7 @@ static int __lxc_idmapped_mounts_child(struct lxc_handler *handler, FILE *f) dfd_from = rootfs->dfd_mnt; else dfd_from = rootfs->dfd_host; - fd_to = open_at(dfd_from, target_relative, PROTECT_OPATH_FILE, PROTECT_LOOKUP_BENEATH_WITH_SYMLINKS, 0); + fd_to = open_at(dfd_from, target_relative, PROTECT_OPATH_FILE, PROTECT_LOOKUP_BENEATH_XDEV, 0); if (fd_to < 0) { if (opts.optional) { TRACE("Skipping optional idmapped mount");