Lines Matching defs:tty
389 * This is called to fork and execute a command when we have no tty. This
559 * This is called to fork and execute a command when we have a tty. This
561 * setting up file descriptors, controlling tty, updating wtmp, utmp,
612 /* Close the master side of the pseudo tty. */
615 /* Make the pseudo tty our controlling tty. */
616 pty_make_controlling_tty(&ttyfd, s->tty);
618 /* Redirect stdin/stdout/stderr from the pseudo tty. */
626 /* Close the extra descriptor for the pseudo tty. */
649 /* Parent. Close the slave side of the pseudo tty. */
683 record_utmp_only(pid, s->tty, s->pw->pw_name,
697 const char *forced = NULL, *tty = NULL;
730 tty = s->tty;
731 if (strncmp(tty, "/dev/", 5) == 0)
732 tty += 5;
737 tty == NULL ? "" : " on ",
738 tty == NULL ? "" : tty,
795 /* Record that there was a login on that tty from the remote host. */
797 record_login(pid, s->tty, pw->pw_name, pw->pw_uid,
1228 child_set_env(&env, &envsize, "SSH_TTY", s->tty);
1580 session_setup_sia(pw, s->ttyfd == -1 ? NULL : s->tty);
1854 session_by_tty(char *tty)
1859 if (s->used && s->ttyfd != -1 && strcmp(s->tty, tty) == 0) {
1860 debug("session_by_tty: session %d tty %s", i, tty);
1864 debug("session_by_tty: unknown tty %.100s", tty);
1963 if (!PRIVSEP(pty_allocate(&s->ptyfd, &s->ttyfd, s->tty,
1964 sizeof(s->tty)))) {
1972 debug("session_pty_req: session %d alloc %s", s->self, s->tty);
1977 pty_setowner(s->pw, s->tty);
2290 debug("%s: session %d release %s", __func__, s->self, s->tty);
2294 record_logout(s->pid, s->tty, s->pw->pw_name);
2296 /* Release the pseudo-tty. */
2298 pty_release(s->tty);
2553 if (strncmp(s->tty, "/dev/", 5) != 0) {
2554 cp = strrchr(s->tty, '/');
2555 cp = (cp == NULL) ? s->tty : cp + 1;
2557 cp = s->tty + 5;