Home
last modified time | relevance | path

Searched refs:ttyfd (Results 1 – 10 of 10) sorted by relevance

/external/dropbear/
Dsshpty.c49 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) in pty_allocate() argument
56 i = openpty(ptyfd, ttyfd, NULL, NULL, NULL); in pty_allocate()
62 name = ttyname(*ttyfd); in pty_allocate()
85 *ttyfd = open(namebuf, O_RDWR | O_NOCTTY); in pty_allocate()
86 if (*ttyfd < 0) { in pty_allocate()
129 *ttyfd = open(namebuf, O_RDWR | O_NOCTTY); in pty_allocate()
130 if (*ttyfd < 0) { in pty_allocate()
141 if (ioctl(*ttyfd, I_PUSH, "ptem") < 0) { in pty_allocate()
145 if (ioctl(*ttyfd, I_PUSH, "ldterm") < 0) { in pty_allocate()
150 if (ioctl(*ttyfd, I_PUSH, "ttcompat") < 0) { in pty_allocate()
[all …]
/external/openssh/
Dsshpty.c64 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in pty_allocate() argument
70 i = openpty(ptyfd, ttyfd, NULL, NULL, NULL); in pty_allocate()
79 name = ttyname(*ttyfd); in pty_allocate()
104 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
127 ioctl(*ttyfd, TCSETCTTY, NULL); in pty_make_controlling_tty()
131 close(*ttyfd); in pty_make_controlling_tty()
132 *ttyfd = fd; in pty_make_controlling_tty()
158 if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0) in pty_make_controlling_tty()
175 close(*ttyfd); in pty_make_controlling_tty()
176 *ttyfd = fd; in pty_make_controlling_tty()
Dreadpass.c122 int rppflags, use_askpass = 0, ttyfd; in read_passphrase() local
134 ttyfd = open(_PATH_TTY, O_RDWR); in read_passphrase()
135 if (ttyfd >= 0) in read_passphrase()
136 close(ttyfd); in read_passphrase()
Dsession.c645 int fdout, ptyfd, ttyfd, ptymaster; in do_exec_pty() local
651 ttyfd = s->ttyfd; in do_exec_pty()
662 close(ttyfd); in do_exec_pty()
669 close(ttyfd); in do_exec_pty()
681 close(ttyfd); in do_exec_pty()
697 pty_make_controlling_tty(&ttyfd, s->tty); in do_exec_pty()
700 if (dup2(ttyfd, 0) < 0) in do_exec_pty()
702 if (dup2(ttyfd, 1) < 0) in do_exec_pty()
704 if (dup2(ttyfd, 2) < 0) in do_exec_pty()
708 close(ttyfd); in do_exec_pty()
[all …]
Dsession.h41 int ptyfd, ttyfd, ptymaster; member
Dmonitor.c1404 if (s->ttyfd != -1) { in mm_session_close()
1427 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); in mm_answer_pty()
1436 if (dup2(s->ttyfd, 0) == -1) in mm_answer_pty()
1451 mm_send_fd(sock, s->ttyfd) == -1) in mm_answer_pty()
1461 close(s->ttyfd); in mm_answer_pty()
1462 s->ttyfd = s->ptyfd; in mm_answer_pty()
1466 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd); in mm_answer_pty()
Dmonitor_wrap.c702 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) in mm_pty_allocate() argument
744 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1) in mm_pty_allocate()
756 if (s->ttyfd == -1) in mm_session_pty_cleanup2()
769 s->ttyfd = -1; in mm_session_pty_cleanup2()
Dconfigure.ac1797 int fd, ptyfd, ttyfd, status;
1811 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
Dconfigure9955 int fd, ptyfd, ttyfd, status;
9969 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/external/ppp/pppd/
Dtty.c126 static int ttyfd; /* Serial port file descriptor */ variable
582 ttyfd = real_ttyfd; in connect_tty()
583 if ((fdflags = fcntl(ttyfd, F_GETFL)) == -1 in connect_tty()
584 || fcntl(ttyfd, F_SETFL, fdflags & ~O_NONBLOCK) < 0) in connect_tty()
595 if (fstat(ttyfd, &statbuf) < 0 in connect_tty()
596 || fchmod(ttyfd, statbuf.st_mode & ~(S_IWGRP | S_IWOTH)) < 0) { in connect_tty()
612 set_up_tty(ttyfd, ((connector != NULL && connector[0] != 0) in connect_tty()
661 int fd = dup(ttyfd); in connect_tty()
667 ttyfd = pty_slave; in connect_tty()
684 if (device_script(initializer, ttyfd, ttyfd, 0) < 0) { in connect_tty()
[all …]