Skip to content

Commit

Permalink
Merge pull request #17301 from giuseppe/4.4-fix-tty
Browse files Browse the repository at this point in the history
[4.4] fix regression with runc --privileged rootless containers
  • Loading branch information
openshift-merge-robot authored Feb 1, 2023
2 parents 0e446a3 + ef4e7b8 commit cd73289
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/util/utils_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ func AddPrivilegedDevices(g *generate.Generator, systemdMode bool) error {
* the rootless containers for security reasons, and
* the container runtime will create it for us
* anyway (ln -s /dev/pts/ptmx /dev/ptmx);
* /dev/tty and
* /dev/tty[0-9]+: Prevent the container from taking over the host's
* virtual consoles, even when not in systemd mode
* for backwards compatibility.
*/
if d.Path == "/dev/ptmx" || isVirtualConsoleDevice(d.Path) {
if d.Path == "/dev/ptmx" || d.Path == "/dev/tty" || isVirtualConsoleDevice(d.Path) {
continue
}
if _, found := mounts[d.Path]; found {
Expand Down

0 comments on commit cd73289

Please sign in to comment.