linux-stable/drivers/tty
Adrian Reber d3b08e2537 tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE
[ Upstream commit e0f25b8992 ]

The capability CAP_CHECKPOINT_RESTORE was introduced to allow non-root
users to checkpoint and restore processes as non-root with CRIU.

This change extends CAP_CHECKPOINT_RESTORE to enable the CRIU option
'--shell-job' as non-root. CRIU's man-page describes the '--shell-job'
option like this:

  Allow one to dump shell jobs. This implies the restored task will
  inherit session and process group ID from the criu itself. This option
  also allows to migrate a single external tty connection, to migrate
  applications like top.

TIOCSLCKTRMIOS can only be done if the process has CAP_SYS_ADMIN and
this change extends it to CAP_SYS_ADMIN or CAP_CHECKPOINT_RESTORE.

With this change it is possible to checkpoint and restore processes
which have a tty connection as non-root if CAP_CHECKPOINT_RESTORE is
set.

Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Adrian Reber <areber@redhat.com>
Acked-by: Andrei Vagin <avagin@gmail.com>
Link: https://lore.kernel.org/r/20231208143656.1019-1-areber@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:14:32 +00:00
..
hvc hvc/xen: fix event channel handling for secondary consoles 2023-11-28 17:19:57 +00:00
ipwireless tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
serdev tty: make counts in tty_port_client_operations hooks size_t 2023-08-11 21:12:44 +02:00
serial serial: sc16is7xx: fix unconditional activation of THRI interrupt 2024-01-31 16:19:10 -08:00
vt TTY/Serial driver changes for 6.6-rc1 2023-09-01 09:38:00 -07:00
Kconfig Merge commit b320441c04 ("Merge tag 'tty-6.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into tty-next 2023-08-20 14:29:37 +02:00
Makefile
amiserial.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
ehv_bytechan.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
goldfish.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
mips_ejtag_fdc.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
moxa.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
mxser.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
n_gsm.c tty: n_gsm: fix race condition in status line change on dead connections 2023-11-08 11:56:22 +01:00
n_hdlc.c tty: ldops: unify to u8 2023-08-11 21:12:47 +02:00
n_null.c tty: ldops: unify to u8 2023-08-11 21:12:47 +02:00
n_tty.c tty: n_tty: deduplicate copy code in n_tty_receive_buf_real_raw() 2023-08-27 11:46:52 +02:00
nozomi.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
pty.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
rpmsg_tty.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
synclink_gt.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
sysrq.c tty/sysrq: replace smp_processor_id() with get_cpu() 2023-11-28 17:19:57 +00:00
tty.h tty: audit: unify to u8 2023-08-11 21:12:46 +02:00
tty_audit.c tty: audit: unify to u8 2023-08-11 21:12:46 +02:00
tty_baudrate.c
tty_buffer.c tty: tty_buffer: invert conditions in __tty_buffer_request_room() 2023-08-22 14:58:16 +02:00
tty_io.c usb: cdc-acm: return correct error code on unsupported break 2024-01-25 15:35:53 -08:00
tty_ioctl.c tty: allow TIOCSLCKTRMIOS with CAP_CHECKPOINT_RESTORE 2024-02-05 20:14:32 +00:00
tty_jobctrl.c tty: tty_jobctrl: fix pid memleak in disassociate_ctty() 2023-11-20 11:59:25 +01:00
tty_ldisc.c tty: tty_ldisc: Remove the ret variable 2023-03-09 17:11:18 +01:00
tty_ldsem.c
tty_mutex.c tty: remove TTY_MAGIC 2022-09-22 16:12:34 +02:00
tty_port.c tty: use u8 for flags 2023-08-11 21:12:45 +02:00
ttynull.c tty: make tty_operations::write()'s count size_t 2023-08-11 21:12:46 +02:00
vcc.c tty: vcc: Add check for kstrdup() in vcc_probe() 2023-11-28 17:19:45 +00:00