From: Christian Brauner Date: Fri, 5 Feb 2021 16:53:41 +0000 (+0100) Subject: conf: use fd_bind_mount() in lxc_fill_autodev() X-Git-Tag: lxc-5.0.0~298^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2c885f199a8ca6bd0f8f1acbbb2671cac04624f;p=thirdparty%2Flxc.git conf: use fd_bind_mount() in lxc_fill_autodev() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/conf.c b/src/lxc/conf.c index fa6c0341f..d436467bf 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -1217,15 +1217,12 @@ static int lxc_fill_autodev(const struct lxc_rootfs *rootfs) if (ret < 0 || (size_t)ret >= sizeof(device_path)) return ret_errno(EIO); - ret = mount_from_at(rootfs->dfd_host, device_path, + ret = fd_bind_mount(rootfs->dfd_host, device_path, PROTECT_OPATH_FILE, PROTECT_LOOKUP_BENEATH_XDEV, rootfs->dfd_dev, device->name, PROTECT_OPATH_FILE, - PROTECT_LOOKUP_BENEATH, - NULL /* fstype */, - MS_BIND /* mount flags */, - NULL); + PROTECT_LOOKUP_BENEATH, 0, false); if (ret < 0) { char path[PATH_MAX];