LXC: Create /dev/tty within a container

Many applications use /dev/tty to read from stdin.
e.g. zypper on openSUSE.

Let's create this device node to unbreak those applications.
As /dev/tty is a synonym for the current controlling terminal
it cannot harm the host or any other containers.

Signed-off-by: Richard Weinberger <richard@nod.at>
(cherry picked from commit 9a0ac6d9c2)

Conflicts:
	src/lxc/lxc_controller.c
This commit is contained in:
Richard Weinberger 2013-07-09 11:05:14 +01:00 committed by Cole Robinson
parent 6cdff51fb3
commit 17cdc298ac

View File

@ -839,6 +839,7 @@ static int lxcContainerPopulateDevices(char **ttyPaths, size_t nttyPaths)
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_FULL, 0666, "/dev/full" },
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_RANDOM, 0666, "/dev/random" },
{ LXC_DEV_MAJ_MEMORY, LXC_DEV_MIN_URANDOM, 0666, "/dev/urandom" },
{ LXC_DEV_MAJ_TTY, LXC_DEV_MIN_TTY, 0666, "/tty" },
};
const struct {
const char *src;