diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-04-20 17:48:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-04-20 17:48:31 +0000 |
commit | d6ebd360288d294ae750a4db56ce1d439a9dcd08 (patch) | |
tree | a55b6a5876ddf7a6f9a7cf25f972be4fdb1c938a /lib/libutil/util.h | |
parent | 202ebe010de214b98ca6dd7a8af50db3f27998e1 (diff) |
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
Diffstat (limited to 'lib/libutil/util.h')
-rw-r--r-- | lib/libutil/util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libutil/util.h b/lib/libutil/util.h index 469e003d587..15bf32db3a7 100644 --- a/lib/libutil/util.h +++ b/lib/libutil/util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: util.h,v 1.34 2013/06/03 21:07:02 tedu Exp $ */ +/* $OpenBSD: util.h,v 1.35 2017/04/20 17:48:30 nicm Exp $ */ /* $NetBSD: util.h,v 1.2 1996/05/16 07:00:22 thorpej Exp $ */ /*- @@ -98,9 +98,13 @@ void pw_prompt(void); void pw_copy(int, int, const struct passwd *, const struct passwd *); int pw_scan(char *, struct passwd *, int *); void pw_error(const char *, int, int); +int getptmfd(void); int openpty(int *, int *, char *, struct termios *, struct winsize *); +int fdopenpty(int, int *, int *, char *, struct termios *, + struct winsize *); int opendisk(const char *, int, char *, size_t, int); pid_t forkpty(int *, char *, struct termios *, struct winsize *); +pid_t fdforkpty(int, int *, char *, struct termios *, struct winsize *); int getmaxpartitions(void); int getrawpartition(void); void login_fbtab(const char *, uid_t, gid_t); |