diff options
author | 2017-04-20 17:48:30 +0000 | |
---|---|---|
committer | 2017-04-20 17:48:30 +0000 | |
commit | c2a62bf3db04acca153f21fa3dd7148f75564929 (patch) | |
tree | 1abaa91d04b536c269e085b26156b114061d6c94 /lib/libutil/util.h | |
parent | Fix previous. (diff) | |
download | wireguard-openbsd-c2a62bf3db04acca153f21fa3dd7148f75564929.tar.xz wireguard-openbsd-c2a62bf3db04acca153f21fa3dd7148f75564929.zip |
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); |