]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: use fd_bind_mount() in lxc_fill_autodev()
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 5 Feb 2021 16:53:41 +0000 (17:53 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 5 Feb 2021 17:52:54 +0000 (18:52 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index fa6c0341ffa23c5357ac62ab9f3a628f3739c83b..d436467bfc068ccd3287180cde0a04e3b5e8dc10 100644 (file)
@@ -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];