| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As discussed on the commits list, there is no need to call revoke()
inside openpty(). On RELENG_6 and RELENG_7 unlockpt() will call
revoke(). On HEAD we create pseudo-terminals on demand, so there is no
need to revoke the slave device node.
This change should never be MFC'd, because the implementation we have in
RELENG_6 and RELENG_7 should work flawlessly with older versions of
libc.
Discussed with: jhb
MFC after: never
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Pass O_NOCTTY to posix_openpt(2). This makes the implementation work
consistently on implementations that make the PTY the controlling TTY
by default.
- Call unlockpt() before opening the slave device. POSIX mentions that
de slave device should only be opened after grantpt() and unlockpt()
have been called.
- Replace some redundant code by a label.
In theory we could remove a lot of code from openpty() on FreeBSD
-CURRENT, because grantpt(), unlockpt() and revoke() are not needed in
our implementation. We'd better keep them there. This makes the code
still work with older FreeBSD releases and even makes it work on other
non-BSD operating systems.
I've compiled openpty() on Linux. You only need to remove the revoke()
call, because revoke() on Linux always returns -1. Apart from that, it
seems to work like it should.
Reviewed by: jhb
|
|
|
|
|
| |
on pts(4) devices this time. This fixes the issues while leaving pts(4)
enabled on HEAD.
|
|
|
|
|
| |
The security fix will be re-committed soon, hopefully without breaking
anything.
|
|
|
|
|
|
|
| |
Fix an off-by-one error in inet_network(3). [08:02]
Security: FreeBSD-SA-08:01.pty
Security: FreeBSD-SA-08:02.libc
|
|
|
|
|
|
|
|
| |
kick off any other users on the device line before using it since
openpty(3) is documented to do this. Note that grantpt(3) does not
call revoke(2), it only adjusts permissions and ownership.
MFC after: 3 days
|
|
|
|
|
|
|
| |
[pt]ty[lmnoLMNO][0-9a-v].
MFC after: 3 days
Reviewed by: rwatson
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
# cd /dev && ./MAKEDEV pty0 pty3
and/or
# rm -rf /dev/ptyp0
and expect all programs that use openpty() to still try to find available ptys.
|
| |
|
|
|
|
| |
openpty() to be called from a threaded application.
|
| |
|
|
|
|
|
|
|
| |
indent and make this compile -Wall clean like the
Makefile suggests that it should. :)
Pointed out by: Bruce Evans <bde@zeta.org.au>
|
|
|
|
| |
Submitted-By: Kent Vander Velden <graphix@iastate.edu>
|
|
|
|
|
|
|
|
| |
Install (optional) libutil.h with prototypes for the functions and
document this in the man page.
minor cleanups to the various routines, include the prototype file, declare
return codes etc.
|
|
|
|
|
|
| |
pty correctly (it was broken for calls to openpty() after the first
successful one)).
Obtained from: 4.4lite2
|
| |
|
|
|
|
| |
Submitted by: Heikki Suonsivu <hsu@cs.hut.fi>
|
|
|