I've applied this patch, and then tweaked the wording a little. Could
you please check the following text:
TIOCGPTPEER int flags
(since Linux 4.13) Given a file descriptor in fd that
refers to a pseudoterminal master, open (with the given
open(2)-style flags) and return a new file descriptor that
refers to the peer pseudoterminal slave device. This operâ
ation can be performed regardless of whether the pathname
of the slave device is accessible through the calling
process's mount namespaces.
Security-conscious programs interacting with namespaces may
wish to use this operation rather than open(2) with the
pathname returned by ptsname(3), and similar library funcâ
tions that have insecure APIs.
I also have a question on the last sentence: what are the "similar library
functions that have insecure APIs"? It's not clear to me what you are
referring to here.