summaryrefslogtreecommitdiffstats
path: root/lib/libutil/pty.c
Commit message (Collapse)AuthorAgeFilesLines
* Add missing header.des2008-11-041-0/+1
|
* Remove unneeded call to revoke() inside openpty().ed2008-10-281-4/+0
| | | | | | | | | | | | | | 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
* Small cleanups to openpty().ed2008-10-031-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | - 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
* Put back the openpty(3) and ptsname(3) fixes but don't disable ptsname(3)jhb2008-01-151-55/+3
| | | | | on pts(4) devices this time. This fixes the issues while leaving pts(4) enabled on HEAD.
* Back out last commit, since it accidentally broke pts.cperciva2008-01-151-3/+55
| | | | | The security fix will be re-committed soon, hopefully without breaking anything.
* Fix issues which allow snooping on ptys. [08:01]cperciva2008-01-141-55/+3
| | | | | | | Fix an off-by-one error in inet_network(3). [08:02] Security: FreeBSD-SA-08:01.pty Security: FreeBSD-SA-08:02.libc
* Invoke revoke(2) on the slave pty in the pts(4) case (new_openpty()) tojhb2007-12-201-1/+13
| | | | | | | | 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
* Bump up the number of ttys supported by pty(4) to 512 by making use ofjhb2007-11-191-1/+1
| | | | | | | [pt]ty[lmnoLMNO][0-9a-v]. MFC after: 3 days Reviewed by: rwatson
* Remove California Regent's clause 3, per letterimp2007-01-091-4/+0
|
* Teach openpty() how to deal with pts.cognet2006-01-261-0/+45
|
* ANSIfy, WARNSify, CONSTify. Bit of style(9)-ify.markm2003-10-181-10/+2
|
* Tidy up. Sort headers.markm2003-06-141-1/+1
|
* Remove 'register' keyword.obrien2002-03-211-2/+2
|
* Add __FBSDID()s to libutildillon2001-09-301-3/+3
|
* In theory it would be perfectly legal for a system administrator tobillf2001-03-101-1/+1
| | | | | | | | # 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.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Remove the static declaration from the line[] variable to allowjb1999-05-241-2/+2
| | | | openpty() to be called from a threaded application.
* Now take stdio.h out of files that don't require it.jkh1998-10-091-2/+1
|
* Protect the copyright comments from reformatting bysteve1997-08-131-0/+5
| | | | | | | indent and make this compile -Wall clean like the Makefile suggests that it should. :) Pointed out by: Bruce Evans <bde@zeta.org.au>
* General -Wall warning cleanup, part I.jkh1996-07-121-0/+1
| | | | Submitted-By: Kent Vander Velden <graphix@iastate.edu>
* Bump libutil revision after recent addition of setproctitle().peter1996-01-011-0/+2
| | | | | | | | 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.
* Update to 4.4lite2 (clean up includes; initialize the name of the masterbde1995-10-221-9/+10
| | | | | | pty correctly (it was broken for calls to openpty() after the first successful one)). Obtained from: 4.4lite2
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* Support for >32 PTYs.jkh1995-02-091-2/+2
| | | | Submitted by: Heikki Suonsivu <hsu@cs.hut.fi>
* BSD 4.4 Lite Lib Sourcesrgrimes1994-05-271-0/+127
OpenPOWER on IntegriCloud