Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs
authornicm <nicm@openbsd.org>
Thu, 20 Apr 2017 17:48:30 +0000 (17:48 +0000)
committernicm <nicm@openbsd.org>
Thu, 20 Apr 2017 17:48:30 +0000 (17:48 +0000)
commitc2a62bf3db04acca153f21fa3dd7148f75564929
tree1abaa91d04b536c269e085b26156b114061d6c94
parent91ba2e421620fcba98a7592305f6a803d62ac337
Add getptmfd(), fdopenpty(), fdforkpty() functions. These allow programs
to separate the open(/dev/ptm) from the ioctl(PTMGET) for privilege
separation or pledge().

Based on a diff from reyk@.

ok deraadt millert
lib/libutil/openpty.3
lib/libutil/pty.c
lib/libutil/shlib_version
lib/libutil/util.h