/systemd/src/libsystemd/sd-login/ |
H A D | test-login.c | 42 char **seats, **sessions, **machines; local 69 r = sd_uid_get_sessions(u2, false, &sessions); 71 assert_se(r == (int) strv_length(sessions)); 72 assert_se(t = strv_join(sessions, ", ")); 73 strv_free(sessions); 74 printf("sessions = %s\n", t); 160 r = sd_seat_get_sessions(seat, &sessions, &uids, &n); 163 assert_se(r == (int) strv_length(sessions)); 164 assert_se(t = strv_join(sessions, ", ")); 165 strv_free(sessions); [all...] |
H A D | sd-login.c | 415 _public_ int sd_uid_get_sessions(uid_t uid, int require_active, char ***sessions) { argument 421 sessions); 443 p = strappend("/run/systemd/sessions/", session); 451 p = strappend("/run/systemd/sessions/", buf); 677 _public_ int sd_seat_get_sessions(const char *seat, char ***sessions, uid_t **uids, unsigned *n_uids) { argument 735 if (sessions) { 736 *sessions = a; 790 _public_ int sd_get_sessions(char ***sessions) { argument 791 return get_files_in_directory("/run/systemd/sessions/", sessions); [all...] |
/systemd/src/systemd/ |
H A D | sd-login.h | 125 * look for active sessions only. */ 128 /* Return sessions of user. If require_active is true, this will look for 129 * active sessions only. Returns the number of sessions. 130 * If sessions is NULL, this will just return the number of sessions. */ 131 int sd_uid_get_sessions(uid_t uid, int require_active, char ***sessions); 184 /* Return sessions and users on seat. Returns number of sessions. 185 * If sessions i [all...] |
/systemd/src/login/ |
H A D | logind-user.c | 112 while (u->sessions) 113 session_free(u->sessions); 180 if (u->sessions) { 186 LIST_FOREACH(sessions_by_user, i, u->sessions) { 197 LIST_FOREACH(sessions_by_user, i, u->sessions) { 211 LIST_FOREACH(sessions_by_user, i, u->sessions) { 225 LIST_FOREACH(sessions_by_user, i, u->sessions) { 239 LIST_FOREACH(sessions_by_user, i, u->sessions) { 253 LIST_FOREACH(sessions_by_user, i, u->sessions) { 319 s = hashmap_get(u->manager->sessions, displa [all...] |
H A D | logind-seat.c | 74 while (s->sessions) 75 session_free(s->sessions); 130 if (s->sessions) { 134 LIST_FOREACH(sessions_by_seat, i, s->sessions) { 142 LIST_FOREACH(sessions_by_seat, i, s->sessions) 350 /* we might have earlier closing sessions on the same VT, so try to 352 LIST_FOREACH(sessions_by_seat, i, s->sessions) 361 LIST_FOREACH(sessions_by_seat, i, s->sessions) 474 LIST_FOREACH(sessions_by_seat, session, s->sessions) { 498 LIST_FOREACH(sessions_by_seat, iter, s->sessions) { [all...] |
H A D | logind-user.h | 59 LIST_HEAD(Session, sessions);
|
H A D | logind-seat-dbus.c | 131 LIST_FOREACH(sessions_by_seat, session, s->sessions) { 237 session = hashmap_get(s->manager->sessions, name); 352 session = hashmap_get(m->sessions, name); 425 session = hashmap_get(m->sessions, name);
|
H A D | logind-seat.h | 37 LIST_HEAD(Session, sessions);
|
H A D | logind-session-dbus.c | 234 "org.freedesktop.login1.lock-sessions", 538 session = hashmap_get(m->sessions, name); 551 session = hashmap_get(m->sessions, e); 585 HASHMAP_FOREACH(session, m->sessions, i) { 606 session = hashmap_get(m->sessions, name); 681 HASHMAP_FOREACH(session, m->sessions, i) {
|
H A D | loginctl.c | 115 log_error("Failed to list sessions: %s", bus_error_message(&error, r)); 134 printf("\n%u sessions listed.\n", k); 306 char **sessions; member in struct:UserStatusInfo 314 char **sessions; member in struct:SeatStatusInfo 340 strv_free(info->sessions); 351 strv_free(info->sessions); 567 { "Sessions", "a(so)", prop_map_sessions_strv, offsetof(UserStatusInfo, sessions) }, 601 if (!strv_isempty(i.sessions)) { 605 STRV_FOREACH(l, i.sessions) { 641 { "Sessions", "a(so)", prop_map_sessions_strv, offsetof(SeatStatusInfo, sessions) }, [all...] |
H A D | logind.c | 76 m->sessions = hashmap_new(&string_hash_ops); 84 if (!m->devices || !m->seats || !m->sessions || !m->users || !m->inhibitors || !m->buttons || !m->user_units || !m->session_units) 118 while ((session = hashmap_first(m->sessions))) 138 hashmap_free(m->sessions); 406 d = opendir("/run/systemd/sessions"); 411 return log_error_errno(errno, "Failed to open /run/systemd/sessions: %m"); 693 * old user-space might run multiple sessions on a single VT, *sigh*. 694 * Therefore, we have to iterate all sessions and find one with a vtfd 716 LIST_FOREACH(sessions_by_seat, iter, m->seat0->sessions) { 1062 HASHMAP_FOREACH(session, m->sessions, [all...] |
H A D | logind-session.c | 64 s->state_file = strappend("/run/systemd/sessions/", id); 79 if (hashmap_put(m->sessions, s->id, s) < 0) { 113 LIST_REMOVE(sessions_by_user, s->user->sessions, s); 126 LIST_REMOVE(sessions_by_seat, s->seat->sessions, s); 145 hashmap_remove(s->manager->sessions, s->id); 156 LIST_PREPEND(sessions_by_user, u->sessions, s); 172 r = mkdir_safe_label("/run/systemd/sessions", 0755, 0, 0); 532 "systemd-user-sessions.service", 805 /* Graphical sessions should really implement a real 810 /* For sessions wit [all...] |
H A D | logind-core.c | 84 s = hashmap_get(m->sessions, id); 334 HASHMAP_FOREACH(s, m->sessions, i) {
|
H A D | logind.h | 45 Hashmap *sessions; member in struct:Manager
|
H A D | logind-user-dbus.c | 93 LIST_FOREACH(sessions_by_user, session, u->sessions) {
|
H A D | logind-dbus.c | 72 session = hashmap_get(m->sessions, name); 436 HASHMAP_FOREACH(session, m->sessions, i) { 716 * backwards-compatibility, so make sure we allow new sessions 739 if (hashmap_get(m->sessions, id)) { 754 } while (hashmap_get(m->sessions, id)); 959 "org.freedesktop.login1.lock-sessions", 1347 /* Check for other users' sessions. Greeter sessions do not 1348 * count, and non-login sessions do not count either. */ 1349 HASHMAP_FOREACH(session, m->sessions, [all...] |
/systemd/src/systemctl/ |
H A D | systemctl.c | 2899 _cleanup_strv_free_ char **sessions = NULL; local 2977 /* Check for current sessions */ 2978 sd_get_sessions(&sessions); 2979 STRV_FOREACH(s, sessions) {
|