From: Wolfgang Bumiller Date: Mon, 20 Aug 2018 08:02:35 +0000 (+0200) Subject: conf: fix path/lxcpath mixups in tty setup X-Git-Tag: lxc-3.1.0~148^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2553%2Fhead;p=thirdparty%2Flxc.git conf: fix path/lxcpath mixups in tty setup Signed-off-by: Wolfgang Bumiller Fixes: 6947153da ("conf: use mknod() to create dummy mount target") --- 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);