Lines Matching defs:session

55         Session *session;
72 session = hashmap_get(m->sessions, name);
73 if (!session)
74 return sd_bus_error_setf(error, BUS_ERROR_NO_SUCH_SESSION, "No session '%s' known", name);
76 *ret = session;
91 /* Note that we get the owner UID of the session, not the actual client UID here! */
118 Session *session;
120 r = manager_get_session_from_creds(m, message, NULL, error, &session);
124 seat = session->seat;
272 Session *session;
282 r = manager_get_session_from_creds(m, message, name, error, &session);
286 p = session_bus_path(session);
295 Session *session = NULL;
312 r = manager_get_session_from_creds(m, message, NULL, error, &session);
316 r = manager_get_session_by_pid(m, pid, &session);
320 if (!session)
321 return sd_bus_error_setf(error, BUS_ERROR_NO_SESSION_FOR_PID, "PID "PID_FMT" does not belong to any known session", pid);
324 p = session_bus_path(session);
421 Session *session;
436 HASHMAP_FOREACH(session, m->sessions, i) {
439 p = session_bus_path(session);
444 session->id,
445 (uint32_t) session->user->uid,
446 session->user->name,
447 session->seat ? session->seat->id : "",
579 Session *session = NULL;
611 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid session type %s", type);
619 return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Invalid session class %s", class);
709 return sd_bus_error_setf(error, BUS_ERROR_SESSION_BUSY, "Already running in a session");
712 * Old gdm and lightdm start the user-session on the same VT as
713 * the greeter session. But they destroy the greeter session
714 * after the user-session and want the user-session to take
726 return sd_bus_error_setf(error, BUS_ERROR_SESSION_BUSY, "Already occupied by a session");
730 /* Keep our session IDs and the audit session IDs in sync */
735 /* Wut? There's already a session by this name and we
740 log_warning("Existing logind session ID %s used by new audit session, ignoring", id);
761 r = manager_add_session(m, id, &session);
765 session_set_user(session, user);
767 session->leader = leader;
768 session->audit_id = audit_id;
769 session->type = t;
770 session->class = c;
771 session->remote = remote;
772 session->vtnr = vtnr;
775 session->tty = strdup(tty);
776 if (!session->tty) {
783 session->display = strdup(display);
784 if (!session->display) {
791 session->remote_user = strdup(remote_user);
792 if (!session->remote_user) {
799 session->remote_host = strdup(remote_host);
800 if (!session->remote_host) {
807 session->service = strdup(service);
808 if (!session->service) {
815 session->desktop = strdup(desktop);
816 if (!session->desktop) {
823 r = seat_attach_session(seat, session);
828 r = session_start(session);
832 session->create_message = sd_bus_message_ref(message);
841 if (session)
842 session_add_to_gc_queue(session);
852 Session *session;
863 r = manager_get_session_from_creds(m, message, name, error, &session);
867 r = session_release(session);
876 Session *session;
887 r = manager_get_session_from_creds(m, message, name, error, &session);
891 return bus_session_method_activate(message, session, error);
897 Session *session;
911 r = manager_get_session_from_creds(m, message, session_name, error, &session);
919 if (session->seat != seat)
922 r = session_activate(session);
931 Session *session;
942 r = manager_get_session_from_creds(m, message, name, error, &session);
946 return bus_session_method_lock(message, session, error);
980 Session *session;
990 r = manager_get_session_from_creds(m, message, name, error, &session);
994 return bus_session_method_kill(message, session, error);
1020 Session *session;
1030 r = manager_get_session_from_creds(m, message, name, error, &session);
1034 return bus_session_method_terminate(message, session, error);
1096 /* Note that we get the owner UID of the session, not the actual client UID here! */
1342 Session *session;
1349 HASHMAP_FOREACH(session, m->sessions, i)
1350 if (session->class == SESSION_USER &&
1351 session->user->uid != uid)
2592 Session *session;
2618 session = hashmap_get(m->session_units, unit);
2619 if (session && streq_ptr(path, session->scope_job)) {
2620 session->scope_job = mfree(session->scope_job);
2621 session_jobs_reply(session, unit, result);
2623 session_save(session);
2624 user_save(session->user);
2625 session_add_to_gc_queue(session);
2639 LIST_FOREACH(sessions_by_user, session, user->sessions)
2640 session_jobs_reply(session, unit, result);
2652 Session *session;
2665 session = hashmap_get(m->session_units, unit);
2666 if (session)
2667 session_add_to_gc_queue(session);
2680 Session *session;
2699 session = hashmap_get(m->session_units, unit);
2700 if (session)
2701 session_add_to_gc_queue(session);
2712 Session *session;
2731 HASHMAP_FOREACH(session, m->sessions, i)
2732 session_add_to_gc_queue(session);
2907 /* Make sure that the session shells are terminated with