/src/lib/libutil/compat/ |
compat_login.c | 63 int tty; variable in typeref:typename:int 68 tty = ttyslot(); 69 if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) { 70 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
|
/src/lib/libutil/ |
login.c | 56 int tty; local in function:login 60 tty = ttyslot(); 61 if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) { 62 (void)lseek(fd, (off_t)(tty * sizeof(struct utmp)), SEEK_SET);
|
/src/usr.bin/mesg/ |
mesg.c | 65 char *tty; local in function:main 79 if ((tty = ttyname(STDIN_FILENO)) == NULL && 80 (tty = ttyname(STDOUT_FILENO)) == NULL && 81 (tty = ttyname(STDERR_FILENO)) == NULL) 83 if (stat(tty, &sb) == -1) 84 err(2, "%s", tty); 97 if (chmod(tty, sb.st_mode | S_IWGRP) == -1) 98 err(2, "%s", tty); 101 if (chmod(tty, sb.st_mode & ~S_IWGRP) == -1) 102 err(2, "%s", tty); [all...] |
/src/distrib/utils/more/ |
ttyin.c | 51 static int tty; variable in typeref:typename:int 60 tty = 2; 74 result = iread(tty, &c, 1);
|
/src/lib/libpam/modules/pam_login_access/ |
pam_login_access.c | 64 const void *rhost, *tty, *user; local in function:pam_sm_acct_mgmt 81 pam_err = pam_get_item(pamh, PAM_TTY, &tty); 88 PAM_LOG("Checking login.access for user %s on tty %s", 89 (const char *)user, (const char *)tty); 90 if (login_access(user, tty) != 0) 93 (const char *)user, (const char *)tty);
|
/src/usr.bin/talk/ |
init_disp.c | 106 struct termios tty; local in function:set_edit_chars 108 tcgetattr(0, &tty); 109 my_win.cerase = tty.c_cc[VERASE]; 110 my_win.kill = tty.c_cc[VKILL]; 111 if (tty.c_cc[VWERASE] == (unsigned char) -1) 114 my_win.werase = tty.c_cc[VWERASE];
|
/src/lib/libpam/modules/pam_securetty/ |
pam_securetty.c | 68 const void *tty; local in function:pam_sm_acct_mgmt 88 pam_err = pam_get_item(pamh, PAM_TTY, &tty); 92 PAM_LOG("Got TTY: %s", (const char *)tty); 95 if (tty != NULL && strncmp(TTY_PREFIX, tty, sizeof(TTY_PREFIX)) == 0) { 97 tty = (const char *)tty + sizeof(TTY_PREFIX) - 1; 100 if (tty != NULL && (ty = getttynam(tty)) != NULL & [all...] |
/src/sbin/slattach/ |
slattach.c | 81 struct termios tty; local in function:main 129 tty.c_cflag = CREAD | CS8 | cflag; 130 tty.c_iflag = 0; 131 tty.c_lflag = 0; 132 tty.c_oflag = 0; 133 tty.c_cc[VMIN] = 1; 134 tty.c_cc[VTIME] = 0; 135 cfsetspeed(&tty, speed); 136 if (tcsetattr(fd, TCSADRAIN, &tty) < 0)
|
/src/usr.sbin/irdaattach/ |
irdaattach.c | 57 struct termios tty; local in function:main 112 tty.c_cflag = CREAD | CS8 | cflag; 113 tty.c_iflag = 0; 114 tty.c_lflag = 0; 115 tty.c_oflag = 0; 116 tty.c_cc[VMIN] = 1; 117 tty.c_cc[VTIME] = 0; 118 cfsetspeed(&tty, 9600); 119 if (tcsetattr(fd, TCSADRAIN, &tty) < 0)
|
/src/usr.sbin/sti/ |
sti.c | 148 const char *tty; local in function:main 155 (void)fprintf(stderr, "Usage: %s <tty> [arg ...]\n", 163 tty = *argv++; 166 if (strncmp(tty, "/dev/", 5) == 0) 167 (void)snprintf(ttydev, sizeof(ttydev), "%s", tty); 168 else if (strncmp(tty, "tty", 3) == 0 || strncmp(tty, "pty", 3) == 0 || 169 strncmp(tty, "pts/", 4) == 0) 170 (void)snprintf(ttydev, sizeof(ttydev), "/dev/%s", tty); [all...] |
/src/usr.bin/rwall/ |
rwall.c | 161 const char *tty; local in function:makemsg 185 tty = ttyname(STDERR_FILENO); 186 if (tty == NULL) 187 tty = "??"; 188 (void)fprintf(fp, " (%s) at %d:%02d ...\n", tty, lt->tm_hour,
|
/src/libexec/utmp_update/ |
utmp_update.c | 83 char tty[MAXPATHLEN]; local in function:main 136 (void)snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, utx->ut_line); 137 fd = open(tty, O_RDONLY|O_NONBLOCK, 0); 140 logerr(errno, "Cannot stat `%s'", tty); 142 logerr(0, "%s: Is not owned by you", tty); 144 logerr(0, "%s: Not a tty device", tty); 146 if (access(tty, W_OK|R_OK) == -1) 147 logerr(errno, "Can't access `%s'", tty); [all...] |
/src/lib/libc/gen/ |
getttyent.c | 69 getttynam(const char *tty) 73 _DIAGASSERT(tty != NULL); 77 if (!strcmp(tty, t->ty_name)) 86 static struct ttyent tty; local in function:getttyent 114 tty.ty_name = p; 116 if (*(tty.ty_getty = p) == '\0') 117 tty.ty_getty = tty.ty_type = NULL; 120 if (*(tty.ty_type = p) == '\0') 121 tty.ty_type = NULL [all...] |
/src/usr.bin/finger/ |
finger.h | 62 short writable; /* tty is writable */ 65 char *tty; /* tty line */ member in struct:where
|
/src/lib/libpam/modules/pam_lastlog/ |
pam_lastlog.c | 119 const char *user, *rhost, *tty, *nuser; local in function:pam_sm_open_session 152 tty = (const char *)vtty; 154 if (tty == NULL) { 164 if (strncmp(tty, _PATH_DEV, strlen(_PATH_DEV)) == 0) 165 tty = tty + strlen(_PATH_DEV); 167 if (*tty == '\0') { 188 doutmpx(user, rhost, tty, ss, &now); 189 dolastlogx(pamh, quiet, pwd, rhost, tty, ss, &now); 193 doutmp(user, rhost, tty, &now) 208 const char *tty, *nuser; local in function:pam_sm_close_session [all...] |
/src/tests/kernel/ |
t_pty.c | 118 atf_tc_fail_errno("Couldn't set tty(4) buffer size"); 120 atf_tc_fail_errno("Couldn't get tty(4) buffer size"); 142 "Couldn't grant permissions on tty(4) device"); 159 atf_tc_fail_errno("Couldn't open tty(4) device"); 166 "Couldn't set tty(4) discipline to PPP"); 190 int tty; local in function:child_spawn 202 tty = tty_open(ttydev); 203 fd_nonblock(tty); 206 (void)printf("child: TTY open, starting read loop\n"); 207 pfd.fd = tty; [all...] |
/src/usr.bin/lock/ |
lock.c | 92 static struct termios tty, ntty; variable in typeref:struct:termios 168 if (tcgetattr(STDIN_FILENO, &tty) < 0) /* get information for header */ 190 ntty = tty; ntty.c_lflag &= ~ECHO; 208 (void)tcsetattr(STDIN_FILENO, TCSADRAIN, &tty); 350 (void)tcsetattr(STDIN_FILENO, TCSADRAIN, &tty); 357 (void)tcsetattr(STDIN_FILENO, TCSADRAIN, &tty);
|
/src/usr.bin/wall/ |
wall.c | 190 const char *whom, *tty; local in function:makebanner 214 tty = ttyname(STDERR_FILENO); 215 if (tty == NULL) 216 tty = "??"; 217 (void)snprintf(lbuf, sizeof lbuf, " (%s) at %d:%02d %s...", tty,
|
/src/usr.bin/write/ |
write.c | 111 (void)fprintf(stderr, "usage: write user [tty]\n"); 126 * the given tty 129 utmp_chk(const char *user, const char *tty) 136 if (strcmp(user, ep->name) == 0 && strcmp(tty, ep->line) == 0) 155 char tty[MAXPATHLEN]; local in function:search_utmp 193 (void)strlcpy(tty, ep->line, sizeof(tty)); 208 user, tty);
|
/src/usr.sbin/sliplogin/ |
sliplogin.c | 50 * This program initializes its own tty port to be an async TCP/IP interface. 215 struct sgttyb tty, otty; local in function:main 251 if ((fd = open("/dev/tty", O_RDONLY, 0)) >= 0) { 256 /* open slip tty again to acquire as controlling tty? */ 285 syslog(LOG_ERR, "stdin not a tty"); 286 errx(1, "stdin not a tty"); 306 if (ioctl(STDIN_FILENO, TIOCGETP, (caddr_t)&tty) < 0) { 310 otty = tty; 311 speed = tty.sg_ispeed [all...] |
/src/libexec/comsat/ |
comsat.c | 226 char tty[sizeof(_PATH_DEV) + sizeof(ep->line) + 1]; local in function:notify 237 (void)snprintf(tty, sizeof(tty), "%s%s", _PATH_DEV, ep->line); 238 if (stat(tty, &stb) == -1 || !(stb.st_mode & S_IEXEC)) { 239 dsyslog(LOG_DEBUG, "%s: wrong mode on %s", ep->name, tty); 242 dsyslog(LOG_DEBUG, "notify %s on %s", ep->name, tty); 254 if ((tp = fopen(tty, "w")) == NULL) { 255 dsyslog(LOG_ERR, "open `%s' (%s)", tty, strerror(errno)); 259 dsyslog(LOG_ERR, "tcgetattr `%s' (%s)", tty, strerror(errno));
|
/src/usr.bin/login/ |
common.c | 80 char term[64], *envinit[1], *hostname, *tty, *nested; variable in typeref:typename:char[64]* [1]** 186 "login %s on tty %s address mismatch " 187 "passed %s != actual %s", username, tty, 205 syslog(LOG_NOTICE, "ROOT LOGIN (%s) on tty %s from %s /" 206 " %s", username, tty, hname, assbuf); 208 syslog(LOG_NOTICE, "ROOT LOGIN (%s) on tty %s", 209 username, tty); 212 syslog(LOG_NOTICE, "%s to %s on tty %s from %s / " 213 "%s", nested, pwd->pw_name, tty, hname, assbuf); 215 syslog(LOG_NOTICE, "%s to %s on tty %s", nested [all...] |
/src/usr.bin/resize/ |
resize.c | 178 static int tty; variable in typeref:typename:int 210 (void) ioctl(tty, TCSETAW, &tioorig); 212 (void) tcsetattr(tty, TCSADRAIN, &tioorig); 214 (void) ioctl(tty, TIOCSETP, &sgorig); 419 name_of_tty = x_strdup("/dev/tty"); 426 tty = fileno(ttyfp); 452 rc = ioctl(tty, TCGETA, &tioorig); 460 rc = tcgetattr(tty, &tioorig); 468 rc = ioctl(tty, TIOCGETP, &sgorig); 474 failed("get tty settings") [all...] |
/src/usr.bin/rfcomm_sppd/ |
rfcomm_sppd.c | 125 char *ep, *tty; local in function:main 134 tty = NULL; 193 case 't': /* Slave TTY name */ 195 asprintf(&tty, "%s%s", _PATH_DEV, optarg); 197 tty = optarg; 218 if (tty == NULL) { 222 tty_in = open_tty(tty); 237 if (tty == NULL) { 264 syslog(LOG_INFO, "Starting on %s...", (tty ? tty : "stdio")) [all...] |
/src/usr.bin/systat/ |
ps.c | 97 const char *user, *comm, *state, *tty, *start, *time_str; local in function:showps 123 tty = tty2str(pt[k].pt_kp); 134 user, pid, pctcpu, pctmem, vsz, rss, tty, state, start, 228 if (strncmp(tty_name, "tty", 3) == 0 ||
|