]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util-lib/systemd-run: implement race-free PTY peer opening (#34953)
authorLuca Boccassi <bluca@debian.org>
Fri, 1 Nov 2024 11:29:19 +0000 (11:29 +0000)
committerGitHub <noreply@github.com>
Fri, 1 Nov 2024 11:29:19 +0000 (11:29 +0000)
This makes use of the new TIOCGPTPEER pty ioctl() for directly opening a
PTY peer, without going via path names. This is nice because it closes a
race around allocating and opening the peer. And also has the nice
benefit that if we acquired an fd originating from some other
namespace/container, we can directly derive the peer fd from it, without
having to reenter the namespace again.

1  2 
src/basic/terminal-util.c
src/basic/terminal-util.h

Simple merge
Simple merge