Searched refs:tty (Results 1 - 21 of 21) sorted by relevance

/systemd/src/getty-generator/
H A Dgetty-generator.c64 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/basic/
H A Dterminal-util.h65 bool tty_is_vc(const char *tty);
66 bool tty_is_vc_resolve(const char *tty);
67 bool tty_is_console(const char *tty) _pure_;
68 int vtnr_from_tty(const char *tty);
69 const char *default_term_for_tty(const char *tty);
H A Dterminal-util.c372 /* 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/journal/
H A Djournald-console.c64 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/shared/
H A Dutmp-wtmp.h42 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 Dutmp-wtmp.c323 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/login/
H A Dpam_systemd.c130 _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 Dlogind-utmp.c62 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 Dlogind-session.c138 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 Dlogind-dbus.c576 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...]
H A Dlogind-session.h81 char *tty; member in struct:Session
H A Dlogind.h194 bool logind_wall_tty_filter(const char *tty, void *userdata);
H A Dloginctl.c287 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 Dlogind-session-dbus.c472 SD_BUS_PROPERTY("TTY", "s", NULL, offsetof(Session, tty), SD_BUS_VTABLE_PROPERTY_CONST),
/systemd/src/libsystemd/sd-bus/
H A Dbus-creds.h64 char *tty; member in struct:sd_bus_creds
H A Dbus-creds.c63 free(c->tty);
601 if (!c->tty)
604 *ret = c->tty;
1092 r = get_ctty(pid, NULL, &c->tty);
1095 c->tty = NULL;
1299 if (c->tty) {
1300 n->tty = strdup(c->tty);
1301 if (!n->tty)
1304 n->tty
[all...]
H A Dbus-dump.c371 fprintf(f, "%sTTY=%s%s%s", prefix, color, strna(c->tty), suffix);
/systemd/src/core/
H A Dexecute.c105 /* 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/libsystemd/sd-login/
H A Dsd-login.c572 _public_ int sd_session_get_tty(const char *session, char **tty) { argument
573 return session_get_string(session, "TTY", tty);
/systemd/src/systemd/
H A Dsd-bus.h370 int sd_bus_creds_get_tty(sd_bus_creds *c, const char **tty);
/systemd/src/systemctl/
H A Dsystemctl.c2980 _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.");

Completed in 103 milliseconds