]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
conf: use a relative path in symlinkat()
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 29 Jul 2021 12:15:51 +0000 (14:15 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 29 Jul 2021 13:41:00 +0000 (15:41 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/conf.c

index c6c9397e215e3b370043e6e01edd5caef3c3eb02..488ae7d5cdf24cd9366185dfb87a3fd9de5f3c30 100644 (file)
@@ -1830,7 +1830,7 @@ static int lxc_finalize_devpts_child(struct lxc_handler *handler)
                return log_error_errno(-1, errno, "Failed to remove existing \"/dev/ptmx\"");
 
        /* Fallback option: Create symlink /dev/ptmx -> /dev/pts/ptmx. */
-       ret = symlinkat("/dev/pts/ptmx", rootfs->dfd_dev, "/dev/ptmx");
+       ret = symlinkat("/dev/pts/ptmx", rootfs->dfd_dev, "dev/ptmx");
        if (ret < 0)
                return log_error_errno(-1, errno, "Failed to create symlink from \"/dev/ptmx\" to \"/dev/pts/ptmx\"");