Lines Matching refs:tty
96 pty_release(const char *tty) in pty_release() argument
99 if (chown(tty, (uid_t) 0, (gid_t) 0) < 0) in pty_release()
100 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); in pty_release()
101 if (chmod(tty, (mode_t) 0666) < 0) in pty_release()
102 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); in pty_release()
109 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
117 fd = open(tty, O_RDWR|O_NOCTTY); in pty_make_controlling_tty()
132 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
167 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
169 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
200 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument
217 if (stat(tty, &st)) in pty_setowner()
218 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner()
222 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner()
226 if (chown(tty, pw->pw_uid, gid) < 0) { in pty_setowner()
230 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
234 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
240 if (chmod(tty, mode) < 0) { in pty_setowner()
244 tty, (u_int)mode, strerror(errno)); in pty_setowner()
247 tty, (u_int)mode, strerror(errno)); in pty_setowner()