gvisor/runsc/boot
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
..
filter Remove license comments 2019-01-31 11:12:53 -08:00
BUILD Remove license comments 2019-01-31 11:12:53 -08:00
compat.go Add unsupported syscall events for get/setsockopt 2018-11-20 14:04:12 -08:00
compat_amd64.go Add unsupported syscall events for get/setsockopt 2018-11-20 14:04:12 -08:00
compat_test.go Add unsupported syscall events for get/setsockopt 2018-11-20 14:04:12 -08:00
config.go Automated rollback of changelist 225089593 2019-01-02 15:48:00 -08:00
controller.go runsc: reap a sandbox process only in sandbox.Wait() 2019-01-29 17:15:56 -08:00
debug.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
events.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
fds.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00
fs.go Factor the subtargets method into a helper method with tests. 2019-02-01 15:23:43 -08:00
limits.go Rename limits.MemoryPagesLocked to limits.MemoryLocked. 2018-12-20 13:28:46 -08:00
loader.go Don't allow writing or reading to TTY unless process group is in foreground. 2019-02-14 15:47:31 -08:00
loader_test.go Prevent internal tmpfs mount to override files in /tmp 2019-01-16 12:48:32 -08:00
network.go Add support for using PACKET_RX_RING to receive packets. 2019-02-13 14:53:03 -08:00
strace.go Use correct company name in copyright header 2018-10-19 16:35:11 -07:00