Lines Matching refs:tty
91 pty_release(const char *tty) in pty_release() argument
94 if (chown(tty, (uid_t) 0, (gid_t) 0) < 0) in pty_release()
95 error("chown %.100s 0 0 failed: %.100s", tty, strerror(errno)); in pty_release()
96 if (chmod(tty, (mode_t) 0666) < 0) in pty_release()
97 error("chmod %.100s 0666 failed: %.100s", tty, strerror(errno)); in pty_release()
104 pty_make_controlling_tty(int *ttyfd, const char *tty) in pty_make_controlling_tty() argument
115 fd = open(tty, O_RDWR|O_NOCTTY); in pty_make_controlling_tty()
130 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
170 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
172 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
208 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument
230 if (stat(tty, &st)) in pty_setowner()
231 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner()
235 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner()
239 if (chown(tty, pw->pw_uid, gid) < 0) { in pty_setowner()
243 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
247 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
253 if (chmod(tty, mode) < 0) { in pty_setowner()
257 tty, (u_int)mode, strerror(errno)); in pty_setowner()
260 tty, (u_int)mode, strerror(errno)); in pty_setowner()