The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/2553

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Signed-off-by: Wolfgang Bumiller <[email protected]>
Fixes: 6947153da ("conf: use mknod() to create dummy mount target")
From adc1c7156ce35881d55bd51f9f6a390627011b05 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <[email protected]>
Date: Mon, 20 Aug 2018 10:02:35 +0200
Subject: [PATCH] conf: fix path/lxcpath mixups in tty setup

Signed-off-by: Wolfgang Bumiller <[email protected]>
Fixes: 6947153da ("conf: use mknod() to create dummy mount target")
---
 src/lxc/conf.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lxc/conf.c b/src/lxc/conf.c
index 4507dc7e2..9ce6689df 100644
--- a/src/lxc/conf.c
+++ b/src/lxc/conf.c
@@ -928,7 +928,7 @@ static int lxc_setup_ttys(struct lxc_conf *conf)
                        if (ret < 0 || (size_t)ret >= sizeof(lxcpath))
                                return -1;
 
-                       ret = mknod(path, S_IFREG | 0000, 0);
+                       ret = mknod(lxcpath, S_IFREG | 0000, 0);
                        if (ret < 0 && errno != EEXIST) {
                                SYSERROR("Failed to create \"%s\"", lxcpath);
                                return -1;
@@ -942,12 +942,12 @@ static int lxc_setup_ttys(struct lxc_conf *conf)
 
                        ret = mount(tty->name, lxcpath, "none", MS_BIND, 0);
                        if (ret < 0) {
-                               WARN("Failed to bind mount \"%s\" onto \"%s\"",
-                                    tty->name, path);
+                               SYSWARN("Failed to bind mount \"%s\" onto 
\"%s\"",
+                                    tty->name, lxcpath);
                                continue;
                        }
                        DEBUG("Bind mounted \"%s\" onto \"%s\"", tty->name,
-                             path);
+                             lxcpath);
 
                        ret = snprintf(lxcpath, sizeof(lxcpath), "%s/tty%d",
                                       ttydir, i + 1);
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to