]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxc-attach: always allocate current controlling pty 859/head
authorChristian Brauner <christian.brauner@mailbox.org>
Mon, 29 Feb 2016 09:52:43 +0000 (10:52 +0100)
committerChristian Brauner <christian.brauner@mailbox.org>
Mon, 29 Feb 2016 16:44:22 +0000 (17:44 +0100)
commita9d02bb9ae42393056ffb66137ec9aff2dac88f1
tree4d096a8bb03b4c183f98641ab203a180bed11705
parentcadbf1a7b6781295d22e86d69c180415ceb2b312
lxc-attach: always allocate current controlling pty

lxc-attach uses lxc_console_create() to allocate a pty on the host.
lxc_console_create() in turn calls lxc_console_peer_default() which either
makes the current controlling pty our controlling pty for the container, or
uses whatever the user gave us (e.g. /dev/tty2 etc.). For lxc-attach we always
want the current controlling pty to be used. This commit ensures that we're in
fact always using the current controlling pty. The commit also fixes a segfault
when the user specified lxc.console.path = none.

Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/lxc_attach.c