The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1178
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) === Avoids a segfault in lxc_attach.c: get_pty_on_host when executed with su: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1567037
From 9ad2b71364d3477f9c03ff305b41a7e8e7827050 Mon Sep 17 00:00:00 2001 From: Philip Poten <philip.po...@gmail.com> Date: Sat, 10 Sep 2016 08:27:51 +0200 Subject: [PATCH] exit with error if no controlling tty is available Avoids a segfault in lxc_attach.c: get_pty_on_host when executed with su: https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1567037 --- src/lxc/console.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lxc/console.c b/src/lxc/console.c index 052512e..4c3e60a 100644 --- a/src/lxc/console.c +++ b/src/lxc/console.c @@ -527,6 +527,11 @@ int lxc_console_create(struct lxc_conf *conf) lxc_console_peer_default(console); + if (console->peer < 0) { + SYSERROR("failed to open console peer - no controlling tty?"); + goto err; + } + if (console->log_path) { console->log_fd = lxc_unpriv(open(console->log_path, O_CLOEXEC | O_RDWR |
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel