Skip to content

Commit 68bbdc2

Browse files
Merge pull request #17304 from mupuf/podman_4.4_regression
Do not mount /dev/tty into rootless containers
2 parents 8a34240 + d10860a commit 68bbdc2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/util/utils_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,12 @@ func AddPrivilegedDevices(g *generate.Generator, systemdMode bool) error {
117117
* the rootless containers for security reasons, and
118118
* the container runtime will create it for us
119119
* anyway (ln -s /dev/pts/ptmx /dev/ptmx);
120+
* /dev/tty and
120121
* /dev/tty[0-9]+: Prevent the container from taking over the host's
121122
* virtual consoles, even when not in systemd mode
122123
* for backwards compatibility.
123124
*/
124-
if d.Path == "/dev/ptmx" || isVirtualConsoleDevice(d.Path) {
125+
if d.Path == "/dev/ptmx" || d.Path == "/dev/tty" || isVirtualConsoleDevice(d.Path) {
125126
continue
126127
}
127128
if _, found := mounts[d.Path]; found {

0 commit comments

Comments
 (0)