diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-08-28 19:54:07 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2015-08-28 19:54:07 +0000 |
commit | 57544f989048664828fb6d9c2b5f7ba6b8bfdad7 (patch) | |
tree | cfbc677cdbc96bd59cdbc6def3b9d2a342522f98 /lib/libutil/openpty.3 | |
parent | 9a4461b12dbb66302c75d3de08a5fdf06a1a4ce6 (diff) |
Remove lies about openpty(4) searching for a free pseudo-tty by iterating
through all existing pseudo-tty devices in /dev.
Diffstat (limited to 'lib/libutil/openpty.3')
-rw-r--r-- | lib/libutil/openpty.3 | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/libutil/openpty.3 b/lib/libutil/openpty.3 index 562e89c9409..a49e533a82f 100644 --- a/lib/libutil/openpty.3 +++ b/lib/libutil/openpty.3 @@ -1,4 +1,4 @@ -.\" $OpenBSD: openpty.3,v 1.16 2013/06/05 03:40:26 tedu Exp $ +.\" $OpenBSD: openpty.3,v 1.17 2015/08/28 19:54:06 kettenis Exp $ .\" Copyright (c) 1995 .\" The Regents of the University of California. All rights reserved. .\" @@ -30,7 +30,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd $Mdocdate: June 5 2013 $ +.Dd $Mdocdate: August 28 2015 $ .Dt OPENPTY 3 .Os .Sh NAME @@ -79,21 +79,15 @@ is non-null, the window size of the slave will be set to the values in .Pp The .Fn openpty -function works in the following way: -first it attempts to allocate the pseudo-tty through the +function allocates the pseudo-tty through the .Pa /dev/ptm device (see .Xr pty 4 -for details) and if that fails it searches for a free pseudo-tty by iterating -through all existing pseudo-tty devices in -.Pa /dev . -When a free pseudo-tty is found, its ownership is changed to -the UID of the caller, permissions are set to correct values, -and all earlier uses of that device are revoked (see +for details) which means that its ownership is changed to the UID of +the caller, permissions are set to correct values, and all earlier +uses of that device are revoked (see .Xr revoke 2 for details). -The first method can work for any user, the second method requires -super-user privileges in most cases. .Pp The .Fn login_tty |