Lines Matching refs:session
84 Session *session = NULL; in get_sender_session() local
115 session = user->display; in get_sender_session()
119 session = hashmap_get(m->sessions, name); in get_sender_session()
121 if (!session) in get_sender_session()
127 *ret = session; in get_sender_session()
138 Session *session; in manager_get_session_from_creds() local
148 session = hashmap_get(m->sessions, name); in manager_get_session_from_creds()
149 if (!session) in manager_get_session_from_creds()
152 *ret = session; in manager_get_session_from_creds()
216 Session *session; in manager_get_seat_from_creds() local
219 r = manager_get_session_from_creds(m, message, name, error, &session); in manager_get_seat_from_creds()
223 seat = session->seat; in manager_get_seat_from_creds()
225 … return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_SEAT, "Session '%s' has no seat.", session->id); in manager_get_seat_from_creds()
388 Session *session; in method_get_session() local
398 r = manager_get_session_from_creds(m, message, name, error, &session); in method_get_session()
402 p = session_bus_path(session); in method_get_session()
414 Session *session = NULL; in method_get_session_by_pid() local
431 r = manager_get_session_from_creds(m, message, NULL, error, &session); in method_get_session_by_pid()
435 r = manager_get_session_by_pid(m, pid, &session); in method_get_session_by_pid()
439 if (!session) in method_get_session_by_pid()
444 p = session_bus_path(session); in method_get_session_by_pid()
543 Session *session; in method_list_sessions() local
557 HASHMAP_FOREACH(session, m->sessions) { in method_list_sessions()
560 p = session_bus_path(session); in method_list_sessions()
565 session->id, in method_list_sessions()
566 (uint32_t) session->user->user_record->uid, in method_list_sessions()
567 session->user->user_record->user_name, in method_list_sessions()
568 session->seat ? session->seat->id : "", in method_list_sessions()
696 Session *session = NULL; in method_create_session() local
902 r = manager_add_session(m, id, &session); in method_create_session()
906 session_set_user(session, user); in method_create_session()
907 r = session_set_leader(session, leader); in method_create_session()
911 session->original_type = session->type = t; in method_create_session()
912 session->class = c; in method_create_session()
913 session->remote = remote; in method_create_session()
914 session->vtnr = vtnr; in method_create_session()
917 session->tty = strdup(tty); in method_create_session()
918 if (!session->tty) { in method_create_session()
923 session->tty_validity = TTY_FROM_PAM; in method_create_session()
927 session->display = strdup(display); in method_create_session()
928 if (!session->display) { in method_create_session()
935 session->remote_user = strdup(remote_user); in method_create_session()
936 if (!session->remote_user) { in method_create_session()
943 session->remote_host = strdup(remote_host); in method_create_session()
944 if (!session->remote_host) { in method_create_session()
951 session->service = strdup(service); in method_create_session()
952 if (!session->service) { in method_create_session()
959 session->desktop = strdup(desktop); in method_create_session()
960 if (!session->desktop) { in method_create_session()
967 r = seat_attach_session(seat, session); in method_create_session()
976 r = session_start(session, message, error); in method_create_session()
984 session->create_message = sd_bus_message_ref(message); in method_create_session()
992 if (session) in method_create_session()
993 session_add_to_gc_queue(session); in method_create_session()
1003 Session *session; in method_release_session() local
1014 r = manager_get_session_from_creds(m, message, name, error, &session); in method_release_session()
1018 r = session_release(session); in method_release_session()
1027 Session *session; in method_activate_session() local
1038 r = manager_get_session_from_creds(m, message, name, error, &session); in method_activate_session()
1044 return bus_session_method_activate(message, session, error); in method_activate_session()
1050 Session *session; in method_activate_session_on_seat() local
1063 r = manager_get_session_from_creds(m, message, session_name, error, &session); in method_activate_session_on_seat()
1071 if (session->seat != seat) in method_activate_session_on_seat()
1081 r = session_activate(session); in method_activate_session_on_seat()
1090 Session *session; in method_lock_session() local
1101 r = manager_get_session_from_creds(m, message, name, error, &session); in method_lock_session()
1105 return bus_session_method_lock(message, session, error); in method_lock_session()
1139 Session *session; in method_kill_session() local
1149 r = manager_get_session_from_creds(m, message, name, error, &session); in method_kill_session()
1153 return bus_session_method_kill(message, session, error); in method_kill_session()
1179 Session *session; in method_terminate_session() local
1189 r = manager_get_session_from_creds(m, message, name, error, &session); in method_terminate_session()
1193 return bus_session_method_terminate(message, session, error); in method_terminate_session()
1501 Session *session; in have_multiple_sessions() local
1507 HASHMAP_FOREACH(session, m->sessions) in have_multiple_sessions()
1508 if (session->class == SESSION_USER && in have_multiple_sessions()
1509 session->user->user_record->uid != uid) in have_multiple_sessions()
3766 Session *session; in match_job_removed() local
3792 session = hashmap_get(m->session_units, unit); in match_job_removed()
3793 if (session) { in match_job_removed()
3794 if (streq_ptr(path, session->scope_job)) { in match_job_removed()
3795 session->scope_job = mfree(session->scope_job); in match_job_removed()
3796 (void) session_jobs_reply(session, id, unit, result); in match_job_removed()
3798 session_save(session); in match_job_removed()
3799 user_save(session->user); in match_job_removed()
3802 session_add_to_gc_queue(session); in match_job_removed()
3825 Session *session; in match_unit_removed() local
3838 session = hashmap_get(m->session_units, unit); in match_unit_removed()
3839 if (session) in match_unit_removed()
3840 session_add_to_gc_queue(session); in match_unit_removed()
3853 Session *session; in match_properties_changed() local
3872 session = hashmap_get(m->session_units, unit); in match_properties_changed()
3873 if (session) in match_properties_changed()
3874 session_add_to_gc_queue(session); in match_properties_changed()
3885 Session *session; in match_reloading() local
3903 HASHMAP_FOREACH(session, m->sessions) in match_reloading()
3904 session_add_to_gc_queue(session); in match_reloading()