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
112 fd = open(tty, O_RDWR|O_NOCTTY); in pty_make_controlling_tty()
127 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
162 fd = open(tty, O_RDWR); in pty_make_controlling_tty()
164 error("%.100s: %.100s", tty, strerror(errno)); in pty_make_controlling_tty()
195 pty_setowner(struct passwd *pw, const char *tty) in pty_setowner() argument
212 if (stat(tty, &st)) in pty_setowner()
213 fatal("stat(%.100s) failed: %.100s", tty, in pty_setowner()
217 ssh_selinux_setup_pty(pw->pw_name, tty); in pty_setowner()
221 if (chown(tty, pw->pw_uid, gid) < 0) { in pty_setowner()
225 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
229 tty, (u_int)pw->pw_uid, (u_int)gid, in pty_setowner()
235 if (chmod(tty, mode) < 0) { in pty_setowner()
239 tty, (u_int)mode, strerror(errno)); in pty_setowner()
242 tty, (u_int)mode, strerror(errno)); in pty_setowner()