nicm
cddf1b0fbc
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
7 years ago
guenther
98ac59d5a1
Use O_CLOEXEC when opening fds local to a function
ok jca@ krw@
7 years ago
matthew
c01980f9dc
Fix pty descriptor leak if fork() fails.
ok millert
11 years ago
deraadt
f0e9631687
Remove excessive sys/cdefs.h inclusion
ok guenther millert kettenis
11 years ago
nicm
f6f6cc630f
ANSIfy forkpty, add missing $OpenBSD$ in duid.c, style (no arg names) in
util.h.
ok guenther
12 years ago
matthew
36e00bde57
Drop support from openpty() for 8+ year old kernels that don't support
/dev/ptm. Users are strongly encouraged to upgrade to a more recent
release if they haven't already.
ok deraadt
12 years ago
deraadt
8cc19b605a
please lint (without making anything else worse)
18 years ago
espie
94a41f5c11
scrape $Id$ tags.
okay deraadt@, millert@, krw@
19 years ago
deraadt
2462bc4b83
knf; otto ok
20 years ago
millert
a46364db49
Crank max ptys to 992. We now have 62 pty/tty pairs for each letter
instead of 16. E.g. it is now /dev/{p,t}typ[0-9a-zA-z] instead of just
/dev/{p,t}typ[0-9a-f]. This requires that you update MAKEDEV and run:
# cd /dev && ./MAKEDEV pty0 && rm -f [pt]ty[rq]*
20 years ago
millert
440a67a653
Add the ptm device to pty(4). By opening /dev/ptm and using the PTMGET
ioctl(2), an unprivileged process may allocate a pty and have its owner
and mode set appropriately. This means that programs such as xterm and
screen no longer need to be setuid. Programs using the openpty()
function require zero changes and will "just work".
Designed by beck@ and deraadt@; changes by beck@ with cleanup (and
a rewrite of the vnode bits) by art@ and tweaks/bugfixes by me.
Tested by many.
20 years ago
millert
679cd5d050
Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.
21 years ago
fgsch
fb18813faf
some -Wall and spaces cleanup, scsi.c left.
some brave soul should look at it.
22 years ago
deraadt
9f44aaa017
strlcpy at most 16 characters, so says man page
22 years ago
deraadt
23c67c2ee8
KNF
22 years ago
deraadt
d3a04e89da
permit threaded use; jb@freebsd
25 years ago
deraadt
2240f00ab9
pty from p to z, P to T. includes v
28 years ago
deraadt
17fdcd3488
fix multiple invocations; from tlb@viaweb.com
28 years ago
downsj
b2f1975b66
util.h: new resting place
opendev.h: ok, so I merged it with util.h
opendev.h: use util.h
everything else: use "util.h"
28 years ago
deraadt
a5010d31aa
libutil
28 years ago
deraadt
47b73ff83c
initial import of NetBSD tree
29 years ago