]>
Commit | Line | Data |
---|---|---|
f46e8fbf WB |
1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2 | From: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
3 | Date: Mon, 20 Aug 2018 10:02:35 +0200 | |
4 | Subject: [PATCH] conf: fix path/lxcpath mixups in tty setup | |
5 | ||
6 | Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com> | |
7 | Fixes: 6947153da ("conf: use mknod() to create dummy mount target") | |
8 | --- | |
9 | src/lxc/conf.c | 8 ++++---- | |
10 | 1 file changed, 4 insertions(+), 4 deletions(-) | |
11 | ||
12 | diff --git a/src/lxc/conf.c b/src/lxc/conf.c | |
13 | index 8c9dce36..0f05bf4e 100644 | |
14 | --- a/src/lxc/conf.c | |
15 | +++ b/src/lxc/conf.c | |
16 | @@ -902,7 +902,7 @@ static int lxc_setup_ttys(struct lxc_conf *conf) | |
17 | if (ret < 0 || (size_t)ret >= sizeof(lxcpath)) | |
18 | return -1; | |
19 | ||
20 | - ret = mknod(path, S_IFREG | 0000, 0); | |
21 | + ret = mknod(lxcpath, S_IFREG | 0000, 0); | |
22 | if (ret < 0 && errno != EEXIST) { | |
23 | SYSERROR("Failed to create \"%s\"", lxcpath); | |
24 | return -1; | |
25 | @@ -916,12 +916,12 @@ static int lxc_setup_ttys(struct lxc_conf *conf) | |
26 | ||
27 | ret = mount(tty->name, lxcpath, "none", MS_BIND, 0); | |
28 | if (ret < 0) { | |
29 | - WARN("Failed to bind mount \"%s\" onto \"%s\"", | |
30 | - tty->name, path); | |
31 | + SYSWARN("Failed to bind mount \"%s\" onto \"%s\"", | |
32 | + tty->name, lxcpath); | |
33 | continue; | |
34 | } | |
35 | DEBUG("Bind mounted \"%s\" onto \"%s\"", tty->name, | |
36 | - path); | |
37 | + lxcpath); | |
38 | ||
39 | ret = snprintf(lxcpath, sizeof(lxcpath), "%s/tty%d", | |
40 | ttydir, i + 1); | |
41 | -- | |
42 | 2.11.0 | |
43 |