mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-03 10:57:08 +08:00
037a0dc083
- [atomicio.c authfd.c scp.c serverloop.c ssh.h sshconnect.c sshd.c] move atomicio into it's own file. wrap all socket write()s which were doing write(sock, buf, len) != len, with atomicio() calls. - [auth-skey.c] fd leak - [authfile.c] properly name fd variable - [channels.c] display great hatred towards strcpy - [pty.c pty.h sshd.c] use openpty() if it exists (it does on BSD4_4) - [tildexpand.c] check for ~ expansion past MAXPATHLEN - Modified helper.c to use new atomicio function. - Reformat Makefile a little - Moved RC4 routines from rc4.[ch] into helper.c - Added autoconf code to detect /dev/ptmx (Solaris) and /dev/ptc (AIX)
47 lines
1.3 KiB
C
47 lines
1.3 KiB
C
/*
|
|
*
|
|
* pty.h
|
|
*
|
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
|
*
|
|
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
|
|
* All rights reserved
|
|
*
|
|
* Created: Fri Mar 17 05:03:28 1995 ylo
|
|
*
|
|
* Functions for allocating a pseudo-terminal and making it the controlling
|
|
* tty.
|
|
*/
|
|
|
|
/* RCSID("$Id: pty.h,v 1.4 1999/12/07 04:38:32 damien Exp $"); */
|
|
|
|
#ifndef PTY_H
|
|
#define PTY_H
|
|
|
|
/*
|
|
* Allocates and opens a pty. Returns 0 if no pty could be allocated, or
|
|
* nonzero if a pty was successfully allocated. On success, open file
|
|
* descriptors for the pty and tty sides and the name of the tty side are
|
|
* returned (the buffer must be able to hold at least 64 characters).
|
|
*/
|
|
int pty_allocate(int *ptyfd, int *ttyfd, char *ttyname, int ttynamelen);
|
|
|
|
/*
|
|
* Releases the tty. Its ownership is returned to root, and permissions to
|
|
* 0666.
|
|
*/
|
|
void pty_release(const char *ttyname);
|
|
|
|
/*
|
|
* Makes the tty the processes controlling tty and sets it to sane modes.
|
|
* This may need to reopen the tty to get rid of possible eavesdroppers.
|
|
*/
|
|
void pty_make_controlling_tty(int *ttyfd, const char *ttyname);
|
|
|
|
/* Changes the window size associated with the pty. */
|
|
void
|
|
pty_change_window_size(int ptyfd, int row, int col,
|
|
int xpixel, int ypixel);
|
|
|
|
#endif /* PTY_H */
|