/systemd/src/journal/ |
H A D | journald-console.c | 64 const char *tty; local 103 tty = s->tty_path ? s->tty_path : "/dev/console"; 105 fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC); 107 log_debug_errno(fd, "Failed to open %s for logging: %m", tty); 112 log_debug_errno(errno, "Failed to write to %s for logging: %m", tty);
|
/systemd/src/login/ |
H A D | logind-utmp.c | 62 bool logind_wall_tty_filter(const char *tty, void *userdata) { argument 68 if (!startswith(tty, "/dev/")) 71 return !streq(tty + 5, m->scheduled_shutdown_tty);
|
H A D | logind-session.h | 81 char *tty; member in struct:Session
|
H A D | pam_systemd.c | 130 _cleanup_free_ char *p = NULL, *tty = NULL; local 140 * the controlling tty of that and if it's a VC then we know 160 r = get_ctty(ucred.pid, NULL, &tty); 164 v = vtnr_from_tty(tty); 226 *tty = NULL, *display = NULL, local 289 pam_get_item(handle, PAM_TTY, (const void**) &tty); 317 tty = strempty(tty); 319 if (strchr(tty, ':')) { 320 /* A tty wit [all...] |
H A D | loginctl.c | 287 char *tty; member in struct:SessionStatusInfo 322 free(info->tty); 423 { "TTY", "s", NULL, offsetof(SessionStatusInfo, tty) }, 493 if (i.tty) 494 printf("\t TTY: %s\n", i.tty);
|
H A D | logind-session.c | 138 free(s->tty); 214 if (s->tty) 215 fprintf(f, "TTY=%s\n", s->tty); 336 "TTY", &s->tty, 754 static int get_tty_atime(const char *tty, usec_t *atime) { argument 758 assert(tty); 761 if (!path_is_absolute(tty)) { 762 p = strappend("/dev/", tty); 766 tty = p; 767 } else if (!path_startswith(tty, "/de [all...] |
H A D | logind-dbus.c | 576 const char *service, *type, *class, *cseat, *tty, *display, *remote_user, *remote_host, *desktop; local 597 r = sd_bus_message_read(message, "uusssssussbss", &uid, &leader, &service, &type, &class, &desktop, &cseat, &vtnr, &tty, &display, &remote, &remote_user, &remote_host); 637 if (tty_is_vc(tty)) { 643 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "TTY %s is virtual console but seat %s is not seat0", tty, seat->id); 645 v = vtnr_from_tty(tty); 647 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Cannot determine VT number from virtual console TTY %s", tty); 654 } else if (tty_is_console(tty)) { 682 else if (!isempty(tty)) 774 if (!isempty(tty)) { 775 session->tty 1994 const char *tty = NULL; local 2032 const char *tty = NULL; local [all...] |
/systemd/src/getty-generator/ |
H A D | getty-generator.c | 64 static int add_serial_getty(const char *tty) { argument 68 assert(tty); 70 log_debug("Automatically adding serial getty for /dev/%s.", tty); 72 r = unit_name_from_path_instance("serial-getty", tty, ".service", &n); 79 static int add_container_getty(const char *tty) { argument 83 assert(tty); 85 log_debug("Automatically adding container getty for /dev/pts/%s.", tty); 87 r = unit_name_from_path_instance("container-getty", tty, ".service", &n); 165 char tty[l + 1]; local 167 memcpy(tty, wor 196 _cleanup_free_ char *tty = NULL; local [all...] |
/systemd/src/shared/ |
H A D | utmp-wtmp.h | 42 bool (*match_tty)(const char *tty, void *userdata), 69 bool (*match_tty)(const char *tty, void *userdata), 65 utmp_wall( const char *message, const char *username, const char *origin_tty, bool (*match_tty)(const char *tty, void *userdata), void *userdata) argument
|
H A D | utmp-wtmp.c | 323 static int write_to_terminal(const char *tty, const char *message) { argument 329 assert(tty); 332 fd = open(tty, O_WRONLY|O_NDELAY|O_NOCTTY|O_CLOEXEC); 383 bool (*match_tty)(const char *tty, void *userdata), 379 utmp_wall( const char *message, const char *username, const char *origin_tty, bool (*match_tty)(const char *tty, void *userdata), void *userdata) argument
|
/systemd/src/libsystemd/sd-bus/ |
H A D | bus-creds.h | 64 char *tty; member in struct:sd_bus_creds
|
/systemd/src/basic/ |
H A D | terminal-util.c | 372 /* We use inotify to be notified when the tty is closed. We 378 * tty loses its controlling process. However, unless some 379 * rogue process uses TIOCNOTTY on /dev/tty *after* closing 380 * its tty otherwise this will not become a problem. As long 382 * on the same tty as an untrusted user this should not be a 416 * successfully became the controlling process of the tty */ 422 * if we already own the tty. */ 425 /* First, try to get the tty */ 490 /* We close the tty fd here since if the old session 518 fd = open("/dev/tty", O_RDW 639 tty_is_vc(const char *tty) argument 645 tty_is_console(const char *tty) argument 654 vtnr_from_tty(const char *tty) argument 679 char *tty; local 711 tty_is_vc_resolve(const char *tty) argument 728 default_term_for_tty(const char *tty) argument [all...] |
/systemd/src/libsystemd/sd-login/ |
H A D | sd-login.c | 572 _public_ int sd_session_get_tty(const char *session, char **tty) { argument 573 return session_get_string(session, "TTY", tty);
|
/systemd/src/core/ |
H A D | execute.c | 105 /* This assumes there is a 'tty' group */ 397 /* Try to make this the controlling tty, if it is a tty, and reset it */ 484 * the way and are not on a tty */ 818 const char *tty, 860 if (tty) { 861 pam_code = pam_set_item(handle, PAM_TTY, tty); 2377 static bool tty_may_match_dev_console(const char *tty) { argument 2381 if (!tty) 2384 if (startswith(tty, "/de 814 setup_pam( const char *name, const char *user, uid_t uid, const char *tty, char ***pam_env, int fds[], unsigned n_fds) argument [all...] |
/systemd/src/systemctl/ |
H A D | systemctl.c | 2980 _cleanup_free_ char *type = NULL, *tty = NULL, *seat = NULL, *user = NULL, *service = NULL, *class = NULL; local 2988 if (sd_session_get_type(*s, &type) < 0 || (!streq(type, "x11") && !streq(type, "tty"))) 2991 sd_session_get_tty(*s, &tty); 2996 log_warning("User %s is logged in on %s.", strna(user), isempty(tty) ? (isempty(seat) ? strna(service) : seat) : tty); 6110 log_error("Cannot edit units if not on a tty.");
|