summaryrefslogtreecommitdiff
path: root/pty.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-04-16 11:18:38 +1000
committerDamien Miller <djm@mindrot.org>2000-04-16 11:18:38 +1000
commit4af51306d9a51459a5bef922df1037f876ae51fe (patch)
tree09ecfc215fce82345a3259f8a0f384b9a67906f0 /pty.c
parent5d1705ecf9bd3216dc99a84242bcdf2e7297d307 (diff)
- OpenBSD CVS updates.
[ssh.1 ssh.c] - ssh -2 [auth.c channels.c clientloop.c packet.c packet.h serverloop.c] [session.c sshconnect.c] - check payload for (illegal) extra data [ALL] - whitespace cleanup
Diffstat (limited to 'pty.c')
-rw-r--r--pty.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/pty.c b/pty.c
index c34f1f5dc..c6af6f471 100644
--- a/pty.c
+++ b/pty.c
@@ -1,20 +1,20 @@
1/* 1/*
2 * 2 *
3 * pty.c 3 * pty.c
4 * 4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 * 6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 8 * All rights reserved
9 * 9 *
10 * Created: Fri Mar 17 04:37:25 1995 ylo 10 * Created: Fri Mar 17 04:37:25 1995 ylo
11 * 11 *
12 * Allocating a pseudo-terminal, and making it the controlling tty. 12 * Allocating a pseudo-terminal, and making it the controlling tty.
13 * 13 *
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$Id: pty.c,v 1.17 2000/03/17 12:58:59 damien Exp $"); 17RCSID("$Id: pty.c,v 1.18 2000/04/16 01:18:44 damien Exp $");
18 18
19#ifdef HAVE_UTIL_H 19#ifdef HAVE_UTIL_H
20# include <util.h> 20# include <util.h>
@@ -46,7 +46,7 @@ RCSID("$Id: pty.c,v 1.17 2000/03/17 12:58:59 damien Exp $");
46 * returned (the buffer must be able to hold at least 64 characters). 46 * returned (the buffer must be able to hold at least 64 characters).
47 */ 47 */
48 48
49int 49int
50pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) 50pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
51{ 51{
52#if defined(HAVE_OPENPTY) || defined(BSD4_4) 52#if defined(HAVE_OPENPTY) || defined(BSD4_4)
@@ -186,7 +186,7 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
186 186
187/* Releases the tty. Its ownership is returned to root, and permissions to 0666. */ 187/* Releases the tty. Its ownership is returned to root, and permissions to 0666. */
188 188
189void 189void
190pty_release(const char *ttyname) 190pty_release(const char *ttyname)
191{ 191{
192 if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) 192 if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0)
@@ -197,7 +197,7 @@ pty_release(const char *ttyname)
197 197
198/* Makes the tty the processes controlling tty and sets it to sane modes. */ 198/* Makes the tty the processes controlling tty and sets it to sane modes. */
199 199
200void 200void
201pty_make_controlling_tty(int *ttyfd, const char *ttyname) 201pty_make_controlling_tty(int *ttyfd, const char *ttyname)
202{ 202{
203 int fd; 203 int fd;
@@ -250,7 +250,7 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
250 250
251/* Changes the window size associated with the pty. */ 251/* Changes the window size associated with the pty. */
252 252
253void 253void
254pty_change_window_size(int ptyfd, int row, int col, 254pty_change_window_size(int ptyfd, int row, int col,
255 int xpixel, int ypixel) 255 int xpixel, int ypixel)
256{ 256{