podman/pkg/util
Dan Čermák 5a2405ae1b
Don't mount /dev/tty* inside privileged containers running systemd
According to https://systemd.io/CONTAINER_INTERFACE/, systemd will try take
control over /dev/ttyN if exported, which can cause conflicts with the host's tty
in privileged containers. Thus we will not expose these to privileged containers
in systemd mode, as this is a bad idea according to systemd's maintainers.

Additionally, this commit adds a bats regression test to check that no /dev/ttyN
are present in a privileged container in systemd mode

This fixes https://github.com/containers/podman/issues/15878

Signed-off-by: Dan Čermák <dcermak@suse.com>
2022-09-22 16:44:26 +02:00
..
camelcase linter: enable wastedassign 2022-03-22 13:04:34 +01:00
filters.go prune filter handling 2022-07-25 09:28:26 -04:00
filters_test.go prune filter handling 2022-07-25 09:28:26 -04:00
kube.go Add support for play/generate kube volumes 2021-04-09 14:01:13 -06:00
mountOpts.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
mountOpts_linux.go Turn off 'noexec' option by default for named volumes 2020-05-20 16:48:20 -04:00
mountOpts_other.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
utils.go podman: add uid and gid options to keep-id 2022-08-30 14:39:27 +02:00
utils_darwin.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
utils_freebsd.go Don't mount /dev/tty* inside privileged containers running systemd 2022-09-22 16:44:26 +02:00
utils_linux.go Don't mount /dev/tty* inside privileged containers running systemd 2022-09-22 16:44:26 +02:00
utils_linux_test.go Fix up errors found by codespell 2020-09-11 06:14:25 -04:00
utils_supported.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
utils_test.go Merge pull request #11218 from cdoern/untilBug 2021-08-26 10:12:09 -04:00
utils_unsupported.go pkg: Build pkg/util on FreeBSD 2022-08-13 07:53:34 +01:00
utils_windows.go pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00