Searched refs:ttyfd (Results 1 - 22 of 22) sorted by relevance

/macosx-10.10/sudo-73/src/
H A Dselinux.c58 int ttyfd; member in struct:selinux_state
75 if (se_state.ttyfd == -1 || se_state.new_tty_context == NULL)
79 if ((retval = fgetfilecon(se_state.ttyfd, &chk_tty_context)) < 0) {
89 if ((retval = fsetfilecon(se_state.ttyfd, se_state.tty_context)) < 0)
93 if (se_state.ttyfd != -1) {
94 close(se_state.ttyfd);
95 se_state.ttyfd = -1;
119 se_state.ttyfd = ptyfd;
127 se_state.ttyfd = open(ttyn, O_RDWR|O_NONBLOCK);
128 if (se_state.ttyfd
[all...]
H A Dsudoreplay.c1067 check_input(ttyfd, speed)
1068 int ttyfd;
1077 fdsr = ecalloc(howmany(ttyfd + 1, NFDBITS), sizeof(fd_mask));
1080 FD_SET(ttyfd, fdsr);
1084 nready = select(ttyfd + 1, fdsr, NULL, NULL, paused ? NULL : &tv);
1087 n = read(ttyfd, &ch, 1);
H A Dsudo.h332 int ttyfd));
H A Dsudo.c873 exec_setup(rbac_enabled, ttyname, ttyfd)
876 int ttyfd;
882 if (selinux_setup(user_role, user_type, ttyname, ttyfd) == -1)
/macosx-10.10/zsh-61/zsh/Src/Modules/
H A Dclone.c46 int ttyfd, pid, cttyfd; local
49 ttyfd = open(*args, O_RDWR|O_NOCTTY);
50 if (ttyfd < 0) {
67 dup2(ttyfd,0);
68 dup2(ttyfd,1);
69 dup2(ttyfd,2);
70 if (ttyfd > 2)
71 close(ttyfd);
99 close(ttyfd);
/macosx-10.10/file_cmds-242/pax/
H A Dtty_subs.c77 int ttyfd; local
79 if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) {
80 if ((ttyoutf = fdopen(ttyfd, "w")) != NULL) {
81 if ((ttyinf = fdopen(ttyfd, "r")) != NULL)
85 (void)close(ttyfd);
/macosx-10.10/OpenSSH-189/openssh/
H A Dsshpty.c64 pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) argument
70 i = openpty(ptyfd, ttyfd, NULL, NULL, NULL);
75 name = ttyname(*ttyfd);
99 pty_make_controlling_tty(int *ttyfd, const char *tty) argument
122 ioctl(*ttyfd, TCSETCTTY, NULL);
126 close(*ttyfd);
127 *ttyfd = fd;
153 if (ioctl(*ttyfd, TIOCSCTTY, NULL) < 0)
170 close(*ttyfd);
171 *ttyfd
[all...]
H A Dreadpass.c122 int rppflags, use_askpass = 0, ttyfd; local
134 ttyfd = open(_PATH_TTY, O_RDWR);
135 if (ttyfd >= 0)
136 close(ttyfd);
H A Dsession.h41 int ptyfd, ttyfd, ptymaster; member in struct:Session
H A Dsession.c648 int fdout, ptyfd, ttyfd, ptymaster; local
654 ttyfd = s->ttyfd;
665 close(ttyfd);
672 close(ttyfd);
684 close(ttyfd);
700 pty_make_controlling_tty(&ttyfd, s->tty);
703 if (dup2(ttyfd, 0) < 0)
705 if (dup2(ttyfd, 1) < 0)
707 if (dup2(ttyfd,
[all...]
H A Dmonitor_wrap.c707 mm_pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, size_t namebuflen) argument
749 (*ttyfd = mm_receive_fd(pmonitor->m_recvfd)) == -1)
761 if (s->ttyfd == -1)
774 s->ttyfd = -1;
H A Dmonitor.c1452 if (s->ttyfd != -1) {
1475 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
1484 if (dup2(s->ttyfd, 0) == -1)
1499 mm_send_fd(sock, s->ttyfd) == -1)
1509 close(s->ttyfd);
1510 s->ttyfd = s->ptyfd;
1514 debug3("%s: tty %s ptyfd %d", __func__, s->tty, s->ttyfd);
H A Dconfigure10477 int fd, ptyfd, ttyfd, status;
10491 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
/macosx-10.10/ppp-786.1.1/Helpers/pppd/
H A Dtty.c163 static int ttyfd; /* Serial port file descriptor */ variable
692 ttyfd = open(devnam, O_NONBLOCK | O_RDWR, 0);
696 if (ttyfd >= 0) {
699 if (ioctl(ttyfd, TIOCEXCL, 0) < 0)
708 if (ttyfd >= 0) {
710 close(ttyfd);
711 ttyfd = -1;
721 real_ttyfd = ttyfd;
722 if ((fdflags = fcntl(ttyfd, F_GETFL)) == -1
723 || fcntl(ttyfd, F_SETF
[all...]
/macosx-10.10/patch_cmds-17/patch/
H A Dutil.c248 static int ttyfd = -1; local
254 if (ttyfd < 0)
255 ttyfd = open(_PATH_TTY, O_RDONLY);
256 if (ttyfd >= 0) {
257 if ((nr = read(ttyfd, buf, sizeof(buf))) > 0 &&
261 if (ttyfd < 0 || nr <= 0) {
/macosx-10.10/gpatch-3/patch/
H A Dutil.c563 static int ttyfd = -2; local
572 if (ttyfd == -2)
580 ttyfd = (posixly_correct || isatty (STDOUT_FILENO)
585 if (ttyfd < 0)
595 while ((r = read (ttyfd, buf + s, bufsize - 1 - s)) == bufsize - 1 - s
610 close (ttyfd);
611 ttyfd = -1;
/macosx-10.10/ppp-786.1.1/Helpers/MiniTerm/
H A DMiniTerm.m111 int err, ttyfd, sockfd;
156 ttyfd = recv_fd(sockfd);
158 file_tty = [[NSFileHandle alloc] initWithFileDescriptor: ttyfd];
/macosx-10.10/tcl-105/tcl_ext/expect/expect/
H A Dexp_clib.c1837 int ttyfd;
2032 ttyfd = open("/dev/tty", O_RDWR);
2033 if (ttyfd >= 0) {
2034 (void) ioctl(ttyfd, TIOCNOTTY, (char *)0);
2035 (void) close(ttyfd);
2857 int ttyfd;
2885 ttyfd = open("/dev/tty", O_RDWR);
2886 if (ttyfd >= 0) {
2888 (void) ioctl(ttyfd, TIOCNOTTY, (char *)0);
2889 (void) close(ttyfd);
1836 int ttyfd; local
2856 int ttyfd; local
[all...]
H A Dexp_command.c585 /* tell Saber to ignore non-use of ttyfd */
587 int ttyfd; local
1150 ttyfd = open("/dev/tty", O_RDWR);
1151 if (ttyfd >= 0) {
1152 (void) ioctl(ttyfd, TIOCNOTTY, (char *)0);
1153 (void) close(ttyfd);
3118 /* tell CenterLine to ignore non-use of ttyfd */
3120 int ttyfd; local
3204 ttyfd = open("/dev/tty", O_RDWR);
3205 if (ttyfd >
[all...]
/macosx-10.10/Heimdal-398.1.2/appl/telnet/telnetd/
H A Dsys_term.c165 static int ttyfd = -1; variable
189 tcgetattr(ttyfd, &termbuf);
205 tcsetattr(ttyfd, TCSANOW, &termbuf);
858 ttyfd = t;
/macosx-10.10/gssd-64/
H A Dgssd_util.c475 in_foreground(int ttyfd) argument
480 if (ttyfd == -1) {
484 ttyfd = ttyfd2;
486 tpg = tcgetpgrp(ttyfd);
/macosx-10.10/ntp-92/ntpd/
H A Drefclock_oncore.c274 int ttyfd; /* TTY file descriptor */ member in struct:instance
718 instance->ttyfd = fd1;
786 close(instance->ttyfd);
788 if ((instance->ppsfd != -1) && (instance->ppsfd != instance->ttyfd))
3494 write(instance->ttyfd, cp, n);
3512 write(instance->ttyfd, cp, n);
3732 fd = instance->ttyfd;

Completed in 300 milliseconds