]> git.ipfire.org Git - thirdparty/lxc.git/commit
terminal: log TIOCGPTPEER failure less alarmingly
authorChristian Brauner <christian.brauner@ubuntu.com>
Thu, 15 Jul 2021 16:37:22 +0000 (18:37 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 15 Jul 2021 16:37:22 +0000 (18:37 +0200)
commitf382bcc6d820c46a54ec928ea7cbfaa3847adc66
treef8057d66da7230131df3986009aaff2372ce2946
parent984f5f0bc5ad17daf53178aee4ba25e32bb9399d
terminal: log TIOCGPTPEER failure less alarmingly

This is not a fatal error and the fallback codepath is equally safe.
When we use TIOCGPTPEER we're using a stashed fd to the container's
devpts mount's ptmx device and allocating a new fd non-path based
through this ioctl. If this ioctl can't be used we're falling back to
allocating a pts device from the host's devpts mount's ptmx device which
is path-based but is not under control of the container and so that's
safe. The difference is just that the first method gets you a nice
native terminal with all the pleasantries of having tty and friends
working whereas the latter method does not.

Fixes: #3625
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/terminal.c