gvisor/runsc
Nicolas Lacasse 0a41ea72c1 Don't allow writing or reading to TTY unless process group is in foreground.
If a background process tries to read from a TTY, linux sends it a SIGTTIN
unless the signal is blocked or ignored, or the process group is an orphan, in
which case the syscall returns EIO.

See drivers/tty/n_tty.c:n_tty_read()=>job_control().

If a background process tries to write a TTY, set the termios, or set the
foreground process group, linux then sends a SIGTTOU. If the signal is ignored
or blocked, linux allows the write. If the process group is an orphan, the
syscall returns EIO.

See drivers/tty/tty_io.c:tty_check_change().

PiperOrigin-RevId: 234044367
Change-Id: I009461352ac4f3f11c5d42c43ac36bb0caa580f9
2019-02-14 15:47:31 -08:00
..
boot Don't allow writing or reading to TTY unless process group is in foreground. 2019-02-14 15:47:31 -08:00
cgroup Remove license comments 2019-01-31 11:12:53 -08:00
cmd gvisor/gofer: Use pivot_root instead of chroot 2019-01-31 15:19:04 -08:00
console Remove license comments 2019-01-31 11:12:53 -08:00
container gvisor/gofer: Use pivot_root instead of chroot 2019-01-31 15:19:04 -08:00
fsgofer Remove license comments 2019-01-31 11:12:53 -08:00
sandbox Remove license comments 2019-01-31 11:12:53 -08:00
specutils Remove license comments 2019-01-31 11:12:53 -08:00
test gvisor/gofer: Use pivot_root instead of chroot 2019-01-31 15:19:04 -08:00
tools/dockercfg Remove license comments 2019-01-31 11:12:53 -08:00
BUILD runsc: Pass log and config files to sandbox process by FD. 2018-09-04 20:10:01 -07:00
main.go gvisor/gofer: Use pivot_root instead of chroot 2019-01-31 15:19:04 -08:00