| /freebsd-13.1/lib/libc/gen/ |
| H A D | getttyent.c | 62 tty += 5; in getttynam() 157 tty.ty_name = p; in getttyent() 158 tty.ty_status = 0; in getttyent() 159 tty.ty_window = NULL; in getttyent() 164 tty.ty_getty = tty.ty_type = NULL; in getttyent() 168 tty.ty_type = NULL; in getttyent() 185 tty.ty_status |= auto_tty_status(tty.ty_name); in getttyent() 187 tty.ty_status |= auto_exists_status(tty.ty_name); in getttyent() 207 tty.ty_comment = p; in getttyent() 209 tty.ty_comment = 0; in getttyent() [all …]
|
| /freebsd-13.1/sys/sys/ |
| H A D | ttydisc.h | 43 struct tty; 47 void ttydisc_open(struct tty *tp); 48 void ttydisc_close(struct tty *tp); 51 void ttydisc_optimize(struct tty *tp); 54 void ttydisc_modem(struct tty *tp, int open); 56 int ttydisc_rint(struct tty *tp, char c, int flags); 59 void ttydisc_rint_done(struct tty *tp); 60 size_t ttydisc_rint_poll(struct tty *tp); 63 size_t ttydisc_getc_poll(struct tty *tp); 72 ttydisc_read_poll(struct tty *tp) in ttydisc_read_poll() [all …]
|
| H A D | tty.h | 63 struct tty { struct 171 void tty_rel_gone(struct tty *tp); 195 int tty_wait(struct tty *tp, struct cv *cv); 198 void tty_wakeup(struct tty *tp, int flags); 201 int tty_checkoutq(struct tty *tp); 202 int tty_putchar(struct tty *tp, char c); 211 void tty_flush(struct tty *tp, int flags); 212 void tty_hiwat_in_block(struct tty *tp); 213 void tty_hiwat_in_unblock(struct tty *tp); 214 dev_t tty_udev(struct tty *tp); [all …]
|
| H A D | ttydevsw.h | 45 typedef int tsw_open_t(struct tty *tp); 46 typedef void tsw_close_t(struct tty *tp); 47 typedef void tsw_outwakeup_t(struct tty *tp); 48 typedef void tsw_inwakeup_t(struct tty *tp); 59 typedef bool tsw_busy_t(struct tty *tp); 86 ttydevsw_open(struct tty *tp) in ttydevsw_open() 96 ttydevsw_close(struct tty *tp) in ttydevsw_close() 106 ttydevsw_outwakeup(struct tty *tp) in ttydevsw_outwakeup() 120 ttydevsw_inwakeup(struct tty *tp) in ttydevsw_inwakeup() 193 ttydevsw_free(struct tty *tp) in ttydevsw_free() [all …]
|
| H A D | ttyhook.h | 38 struct tty; 47 typedef void th_rint_done_t(struct tty *tp); 48 typedef size_t th_rint_poll_t(struct tty *tp); 52 typedef size_t th_getc_poll_t(struct tty *tp); 54 typedef void th_close_t(struct tty *tp); 73 void ttyhook_unregister(struct tty *); 79 ttyhook_rint(struct tty *tp, char c, int flags) in ttyhook_rint() 97 ttyhook_rint_done(struct tty *tp) in ttyhook_rint_done() 106 ttyhook_rint_poll(struct tty *tp) in ttyhook_rint_poll() 133 ttyhook_getc_poll(struct tty *tp) in ttyhook_getc_poll() [all …]
|
| /freebsd-13.1/crypto/openssh/ |
| H A D | sshpty.c | 87 pty_release(const char *tty) in pty_release() argument 90 if (chown(tty, (uid_t) 0, (gid_t) 0) == -1) in pty_release() 92 if (chmod(tty, (mode_t) 0666) == -1) in pty_release() 134 fd = open(tty, O_RDWR); in pty_make_controlling_tty() 185 if (stat(tty, &st) == -1) in pty_setowner() 186 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner() 190 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner() 194 if (chown(tty, pw->pw_uid, gid) == -1) { in pty_setowner() 198 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner() 202 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner() [all …]
|
| /freebsd-13.1/usr.bin/mesg/ |
| H A D | mesg.c | 66 char *tty; in main() local 78 if ((tty = ttyname(STDIN_FILENO)) == NULL && in main() 79 (tty = ttyname(STDOUT_FILENO)) == NULL && in main() 80 (tty = ttyname(STDERR_FILENO)) == NULL) in main() 82 if (stat(tty, &sb) < 0) in main() 83 err(2, "%s", tty); in main() 96 if (chmod(tty, sb.st_mode | S_IWGRP) < 0) in main() 97 err(2, "%s", tty); in main() 100 if (chmod(tty, sb.st_mode & ~S_IWGRP) < 0) in main() 101 err(2, "%s", tty); in main()
|
| /freebsd-13.1/contrib/less/ |
| H A D | ttyin.c | 27 public HANDLE tty; variable 29 public int tty; variable 75 GetConsoleMode(tty, &console_mode); in open_getchr() 87 tty = open("CON", OPEN_READ); in open_getchr() 104 tty = __open(tty_device(), OPEN_READ); in open_getchr() 106 tty = open(tty_device(), OPEN_READ); in open_getchr() 108 if (tty < 0) in open_getchr() 109 tty = 2; in open_getchr() 121 SetConsoleMode(tty, console_mode); in close_getchr() 122 CloseHandle(tty); in close_getchr() [all …]
|
| /freebsd-13.1/libexec/rc/rc.d/ |
| H A D | serial | 69 stty < /dev/tty${dc}${i}.init reprint undef 72 stty < /dev/tty${dc}${i}.lock clocal 75 stty < /dev/tty${dc}${i}.lock 300 88 comcontrol /dev/tty${dc}${i} dtrwait 100 drainwait 180 91 stty < /dev/tty${dc}${i}.init crtscts 115200 92 stty < /dev/tty${dc}${i}.lock crtscts 107 stty < /dev/tty${dc}${i}.init clocal -hupcl 1200 108 stty < /dev/tty${dc}${i}.lock clocal hupcl 127 comcontrol /dev/tty${dc}${i} dtrwait 0 128 stty < /dev/tty${dc}${i}.init 115200 [all …]
|
| /freebsd-13.1/bin/pkill/tests/ |
| H A D | pkill-t_test.sh | 9 tty=`ps -x -o tty -p $$ | tail -1` 10 if [ "$tty" = "??" -o "$tty" = "-" ]; then 11 tty="-" 14 case $tty in 15 pts/*) ttyshort=`echo $tty | cut -c 5-` ;; 16 *) ttyshort=`echo $tty | cut -c 4-` ;; 23 pkill -f -t $tty $sleep
|
| H A D | pgrep-t_test.sh | 9 tty=`ps -x -o tty -p $$ | tail -1` 10 if [ "$tty" = "??" -o "$tty" = "-" ]; then 11 tty="-" 14 case $tty in 15 pts/*) ttyshort=`echo $tty | cut -c 5-` ;; 16 *) ttyshort=`echo $tty | cut -c 4-` ;; 24 pid=`pgrep -f -t $tty $sleep`
|
| /freebsd-13.1/lib/libpam/modules/pam_securetty/ |
| H A D | pam_securetty.c | 63 const void *tty; in pam_sm_acct_mgmt() local 78 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt() 82 PAM_LOG("Got TTY: %s", (const char *)tty); in pam_sm_acct_mgmt() 85 if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { in pam_sm_acct_mgmt() 87 tty = (const char *)tty + sizeof(TTY_PREFIX) - 1; in pam_sm_acct_mgmt() 90 if (tty != NULL && (ty = getttynam(tty)) != NULL && in pam_sm_acct_mgmt()
|
| /freebsd-13.1/contrib/tcsh/ |
| H A D | sh.file.c | 181 tty_normal = tty; in back_to_col_1() 182 tty.c_iflag &= ~INLCR; in back_to_col_1() 183 tty.c_oflag &= ~ONLCR; in back_to_col_1() 197 tty_normal = tty; in back_to_col_1() 198 tty.sg_flags &= ~CRMOD; in back_to_col_1() 233 tty_normal = tty; in pushback() 260 tty_normal = tty; in pushback() 261 tty.sg_flags &= ~ECHO; in pushback() 385 struct termios tty; in retype() local 389 struct termio tty; in retype() [all …]
|
| /freebsd-13.1/crypto/heimdal/appl/login/ |
| H A D | read_string.c | 56 FILE *tty; in read_string() local 76 if((tty = fopen("/dev/tty", "r")) == NULL) in read_string() 77 tty = stdin; in read_string() 83 tcgetattr(fileno(tty), &t_old); in read_string() 86 tcsetattr(fileno(tty), TCSANOW, &t_new); in read_string() 91 c = getc(tty); in read_string() 93 if(!ferror(tty)) in read_string() 109 tcsetattr(fileno(tty), TCSANOW, &t_old); in read_string() 112 if(tty != stdin) in read_string() 113 fclose(tty); in read_string()
|
| /freebsd-13.1/usr.bin/write/ |
| H A D | write.c | 89 char tty[MAXPATHLEN], *mytty; in main() local 170 do_write(devfd, tty, mytty, login); in main() 202 utmp_chk(char *user, char *tty) in utmp_chk() argument 206 strncpy(lu.ut_line, tty, sizeof lu.ut_line); in utmp_chk() 254 (void)strlcpy(tty, u->ut_line, MAXPATHLEN); in search_utmp() 263 (void)strlcpy(tty, mytty, MAXPATHLEN); in search_utmp() 281 if (fstatat(devfd, tty, &s, 0) < 0) { in term_chk() 283 warn("%s%s", _PATH_DEV, tty); in term_chk() 303 fd = openat(devfd, tty, O_WRONLY); in do_write() 305 err(1, "openat(%s%s)", _PATH_DEV, tty); in do_write() [all …]
|
| /freebsd-13.1/contrib/ncurses/ncurses/trace/ |
| H A D | lib_tracebits.c | 101 _nc_trace_ttymode(TTY * tty) in _nc_trace_ttymode() argument 171 if (tty->c_iflag & ALLIN) in _nc_trace_ttymode() 172 lookup_bits(buf, iflags, "iflags", tty->c_iflag); in _nc_trace_ttymode() 174 if (tty->c_oflag & ALLOUT) in _nc_trace_ttymode() 175 lookup_bits(buf, oflags, "oflags", tty->c_oflag); in _nc_trace_ttymode() 177 if (tty->c_cflag & ALLCTRL) in _nc_trace_ttymode() 178 lookup_bits(buf, cflags, "cflags", tty->c_cflag); in _nc_trace_ttymode() 197 int value = (int) (tty->c_cflag & CSIZE); in _nc_trace_ttymode() 212 if (tty->c_lflag & ALLLOCAL) in _nc_trace_ttymode() 213 lookup_bits(buf, lflags, "lflags", tty->c_lflag); in _nc_trace_ttymode() [all …]
|
| /freebsd-13.1/usr.sbin/bhyve/ |
| H A D | uart_emul.c | 133 struct ttyfd tty; member 197 if (sc->tty.opened) { in rxfifo_reset() 238 if (sc->tty.opened) { in rxfifo_putchar() 266 if (sc->tty.opened) { in rxfifo_getchar() 288 ttyopen(&sc->tty); in uart_opentty() 386 assert(fd == sc->tty.rfd); in uart_drain() 397 (void) ttyread(&sc->tty); in uart_drain() 659 sc->tty.rfd = STDIN_FILENO; in uart_stdio_backend() 661 sc->tty.opened = true; in uart_stdio_backend() 699 sc->tty.rfd = sc->tty.wfd = fd; in uart_tty_backend() [all …]
|
| /freebsd-13.1/lib/libpam/modules/pam_login_access/ |
| H A D | pam_login_access.c | 74 const void *rhost, *tty, *user; in pam_sm_acct_mgmt() local 91 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_acct_mgmt() 112 } else if (tty != NULL && *(const char *)tty != '\0') { in pam_sm_acct_mgmt() 114 (const char *)user, (const char *)tty); in pam_sm_acct_mgmt() 115 if (login_access(user, tty, &login_access_opts) != 0) in pam_sm_acct_mgmt() 118 (const char *)user, (const char *)tty); in pam_sm_acct_mgmt()
|
| /freebsd-13.1/sys/kern/ |
| H A D | tty.c | 276 struct tty *tp; in ttydev_open() 819 struct tty *tp; in ttyil_open() 1048 struct tty * 1055 struct tty * 1058 struct tty *tp; in tty_alloc_mutex() 1112 struct tty *tp = arg; in tty_dealloc() 1313 struct tty *tp; in sysctl_kern_ttys() 2068 struct tty *tp; in ttyhook_register() 2165 struct tty *tp; in ttyconsdev_open() 2345 struct tty *tp; in DB_SHOW_COMMAND() [all …]
|
| H A D | tty_ttydisc.c | 87 ttydisc_open(struct tty *tp) in ttydisc_open() 93 ttydisc_close(struct tty *tp) in ttydisc_close() 587 ttydisc_optimize(struct tty *tp) in ttydisc_optimize() 698 struct tty *tp = d; in ttydisc_reprint_char() 704 ttydisc_reprint(struct tty *tp) in ttydisc_reprint() 719 struct tty *tp; 727 struct tty *tp = data->tp; in ttydisc_recalc_charlength() 750 ttydisc_rubchar(struct tty *tp) in ttydisc_rubchar() 823 ttydisc_rubword(struct tty *tp) in ttydisc_rubword() 1136 ttydisc_rint_done(struct tty *tp) in ttydisc_rint_done() [all …]
|
| /freebsd-13.1/usr.sbin/pstat/ |
| H A D | pstat.c | 238 TAILQ_HEAD(, tty) tl; in ttymode_kvm() 239 struct tty *tp, tty; in ttymode_kvm() local 249 if (kvm_read(kd, (u_long)tp, &tty, sizeof tty) != sizeof tty) in ttymode_kvm() 252 xt.xt_incc = tty.t_inq.ti_linestart - tty.t_inq.ti_begin; in ttymode_kvm() 253 xt.xt_inlc = tty.t_inq.ti_end - tty.t_inq.ti_linestart; in ttymode_kvm() 254 xt.xt_inlow = tty.t_inlow; in ttymode_kvm() 256 xt.xt_outcc = tty.t_outq.to_end - tty.t_outq.to_begin; in ttymode_kvm() 257 xt.xt_outlow = tty.t_outlow; in ttymode_kvm() 258 xt.xt_column = tty.t_column; in ttymode_kvm() 261 xt.xt_flags = tty.t_flags; in ttymode_kvm() [all …]
|
| /freebsd-13.1/contrib/opie/ |
| H A D | opielogin.c | 358 char *tty; variable 362 if (tty == NULL) 363 tty = ttyn; 365 tty++; 651 char *tty, host[256]; variable 1003 tty = ttyname(0); 1005 if (tty == (char *) 0 || *tty == '\0') 1111 name, tty, host); 1114 name, tty); 1298 chmod(tty, 0622); [all …]
|
| /freebsd-13.1/usr.bin/who/ |
| H A D | who.c | 167 char buf[80], tty[PATH_MAX]; in row() local 180 snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, ut->ut_line); in row() 181 if (stat(tty, &sb) == 0) { in row() 270 const char *name, *tty; in whoami() local 272 if ((tty = ttyname(STDIN_FILENO)) == NULL) in whoami() 273 tty = "tty??"; in whoami() 274 else if (strncmp(tty, _PATH_DEV, sizeof _PATH_DEV - 1) == 0) in whoami() 275 tty += sizeof _PATH_DEV - 1; in whoami() 276 strlcpy(ut.ut_line, tty, sizeof ut.ut_line); in whoami()
|
| /freebsd-13.1/lib/libutil/ |
| H A D | login_ok.c | 128 login_ttyok(login_cap_t *lc, const char *tty, const char *allowcap, in login_ttyok() argument 133 if (lc != NULL && tty != NULL && *tty != '\0') { in login_ttyok() 138 te = getttynam(tty); /* Need group name */ in login_ttyok() 142 if (ttl != NULL && !login_str2inlist(ttl, tty, grp, 0)) in login_ttyok() 147 if (ttl != NULL && login_str2inlist(ttl, tty, grp, 0)) in login_ttyok() 163 auth_ttyok(login_cap_t *lc, const char * tty) in auth_ttyok() argument 165 return login_ttyok(lc, tty, "ttys.allow", "ttys.deny"); in auth_ttyok()
|
| /freebsd-13.1/lib/libpam/modules/pam_lastlog/ |
| H A D | pam_lastlog.c | 75 const void *rhost, *tty; in pam_sm_open_session() local 91 pam_err = pam_get_item(pamh, PAM_TTY, &tty); in pam_sm_open_session() 96 if (tty == NULL) { in pam_sm_open_session() 102 if (strncmp(tty, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) in pam_sm_open_session() 103 tty = (const char *)tty + sizeof(_PATH_DEV) - 1; in pam_sm_open_session() 140 strncpy(utl.ut_line, tty, sizeof utl.ut_line); in pam_sm_open_session()
|