diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2017-10-08 14:10:46 +0200 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2017-10-08 17:47:58 +0200 |
commit | 645ac9aaf89e3311949828546df6334322f48933 (patch) | |
tree | c3fcdd65127627d5f889060c145f238d953e2b1f /ChangeLog | |
parent | 98e0742024d4c13c08a6076b3d119c250e7d0118 (diff) | |
download | glibc-645ac9aaf89e3311949828546df6334322f48933.zip glibc-645ac9aaf89e3311949828546df6334322f48933.tar.gz glibc-645ac9aaf89e3311949828546df6334322f48933.tar.bz2 |
openpty: use TIOCGPTPEER to open slave side fd
Newer kernels expose the ioctl TIOCGPTPEER [1] call to userspace which allows to
safely allocate a file descriptor for a pty slave based solely on the master
file descriptor. This allows us to avoid path-based operations and makes this
function a lot safer in the face of devpts mounts in different mount namespaces.
[1]: https://patchwork.kernel.org/patch/9760743/
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2,6 +2,9 @@ * login/openpty.c (openpty): Close slave pty file descriptor on error. + * login/openpty.c (openpty): If defined, use the TIOCGPTPEER ioctl() + call to allocate the slave pty file descriptor. + 2017-10-06 Joseph Myers <joseph@codesourcery.com> * sysdeps/ieee754/ldbl-128/s_fma.c: Include <libm-alias-double.h>. |