logind-dbus.c revision 84c3361e129a5ae7a5a408b1562f7f2336b1de3a
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering This file is part of systemd.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering Copyright 2011 Lennart Poettering
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is free software; you can redistribute it and/or modify it
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering under the terms of the GNU General Public License as published by
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering the Free Software Foundation; either version 2 of the License, or
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering (at your option) any later version.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering systemd is distributed in the hope that it will be useful, but
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering General Public License for more details.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering You should have received a copy of the GNU General Public License
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <interface name=\"org.freedesktop.login1.Manager\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"GetSession\">\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"session\" type=\"o\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"GetSessionByPID\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"pid\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"session\" type=\"o\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"GetUser\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"user\" type=\"o\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"GetSeat\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"seat\" type=\"o\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"ListSessions\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"sessions\" type=\"a(susso)\" direction=\"out\"/>\n" \
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730Tom Gundersen " </method>\n" \
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730Tom Gundersen " <method name=\"ListUsers\">\n" \
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730Tom Gundersen " <arg name=\"users\" type=\"a(uso)\" direction=\"out\"/>\n" \
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730Tom Gundersen " </method>\n" \
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730Tom Gundersen " <method name=\"ListSeats\">\n" \
7c1ff6ac3d9e3acae1d601d40728cf7ccc9a7730Tom Gundersen " <arg name=\"seats\" type=\"a(so)\" direction=\"out\"/>\n" \
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen " </method>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <method name=\"CreateSession\">\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen " <arg name=\"leader\" type=\"u\" direction=\"in\"/>\n" \
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen " <arg name=\"sevice\" type=\"s\" direction=\"in\"/>\n" \
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen " <arg name=\"type\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"tty\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"display\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"remote\" type=\"b\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"remote_user\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"remote_host\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"controllers\" type=\"as\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"reset_controllers\" type=\"as\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"kill_processes\" type=\"b\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"out\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"path\" type=\"o\" direction=\"out\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"runtime_path\" type=\"o\" direction=\"out\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"out\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"out\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " </method>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <method name=\"ActivateSession\">\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " </method>\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <method name=\"ActivateSessionOnSeat\">\n" \
58db254ade4fb2ef77de68f28c4f13814819f6a1Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
36d9205d669bcdcb04fa730d1f3549a9fc9a9001Tom Gundersen " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"LockSession\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"UnlockSession\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"KillSession\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"who\" type=\"s\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"signal\" type=\"s\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"KillUser\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"signal\" type=\"s\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"TerminateSession\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"TerminateUser\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"TerminateSeat\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"SetUserLinger\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"b\" type=\"b\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " </method>\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <method name=\"AttachDevice\">\n" \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"sysfs\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"FlushDevices\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"PowerOff\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"Reboot\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <signal name=\"SessionNew\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <signal name=\"SessionRemoved\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <signal name=\"UserNew\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <signal name=\"UserRemoved\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <signal name=\"SeatNew\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <signal name=\"SeatRemoved\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"ControlGroupHierarchy\" type=\"s\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"Controllers\" type=\"as\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"ResetControllers\" type=\"as\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"NAutoVTs\" type=\"u\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"KillOnlyUsers\" type=\"as\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"KillExcludeUsers\" type=\"as\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"KillUserProcesses\" type=\"b\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"IdleHint\" type=\"b\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"IdleSinceHint\" type=\"t\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"IdleSinceHintMonotonic\" type=\"t\" access=\"read\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </interface>\n"
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering "org.freedesktop.login1.Manager\0"
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic int bus_manager_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poetteringstatic int bus_manager_append_idle_hint_since(DBusMessageIter *i, const char *property, void *data) {
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering u = streq(property, "IdleSinceHint") ? t.realtime : t.monotonic;
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, &u))
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMessage **_reply) {
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering const char *type, *seat, *tty, *display, *remote_user, *remote_host, *service;
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering char **controllers = NULL, **reset_controllers = NULL;
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering if (!dbus_message_iter_init(message, &iter) ||
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering dbus_message_iter_get_basic(&iter, &uid);
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_basic(&iter, &leader);
b826ab586c9e0a9c0d438a75c28cf3a8ab485929Tom Gundersen dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_basic(&iter, &type);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_basic(&iter, &seat);
d5099efc47d4e6ac60816b5381a5f607ab03f06eMichal Schmidt dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
d23a27a964748967e1ad20e86de869a753af555bTom Gundersen dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &tty);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering else if (s != m->vtconsole)
23432a1c249b9c513e438bffe9778a7ce2ee74feZbigniew Jędrzejewski-Szmek return v < 0 ? v : -EINVAL;
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering } else if (!isempty(tty) && s && seat_is_vtconsole(s))
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering dbus_message_iter_get_basic(&iter, &display);
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_basic(&iter, &remote);
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_basic(&iter, &remote_user);
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_basic(&iter, &remote_host);
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_STRING)
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering r = bus_parse_strv_iter(&iter, &controllers);
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering if (strv_contains(controllers, "systemd") ||
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_STRING) {
8ac4e9e1e54397f6d1745c2a7a806132418c7da2Lennart Poettering r = bus_parse_strv_iter(&iter, &reset_controllers);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek if (strv_contains(reset_controllers, "systemd") ||
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN) {
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering dbus_message_iter_get_basic(&iter, &kill_processes);
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering r = manager_add_user_by_uid(m, uid, &user);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek audit_session_from_pid(leader, &audit_id);
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek asprintf(&id, "%lu", (unsigned long) audit_id);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek fifo_fd = session_create_fifo(session);
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek /* Session already exists, client is probably
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek * something like "su" which changes uid but
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen * is still the same audit session */
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen reply = dbus_message_new_method_return(message);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek seat = session->seat ? session->seat->id : "";
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering DBUS_TYPE_STRING, &session->user->runtime_path,
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering asprintf(&id, "c%lu", ++m->session_counter);
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering r = manager_add_session(m, user, id, &session);
78c6a153c47f8d597c827bdcaf8c4e42ac87f738Lennart Poettering session->reset_controllers = reset_controllers;
78c6a153c47f8d597c827bdcaf8c4e42ac87f738Lennart Poettering session->kill_processes = kill_processes;
78c6a153c47f8d597c827bdcaf8c4e42ac87f738Lennart Poettering session->remote_user = strdup(remote_user);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering session->remote_host = strdup(remote_host);
9de3e3294065e8697ff10130b53f274319cdcf6fZbigniew Jędrzejewski-Szmek reply = dbus_message_new_method_return(message);
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering DBUS_TYPE_STRING, &session->user->runtime_path,
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek session_add_to_gc_queue(session);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmekstatic int trigger_device(Manager *m, struct udev_device *d) {
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek struct udev_list_entry *first, *item;
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek e = udev_enumerate_new(m->udev);
03664a62914782dbd8f069bbcf8a0c8ca1df7010Lukas Nykryn if (udev_enumerate_add_match_parent(e, d) < 0) {
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek if (udev_enumerate_scan_devices(e) < 0) {
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen const char *p;
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmekstatic int attach_device(Manager *m, const char *seat, const char *sysfs) {
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek char *rule = NULL, *file = NULL;
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek d = udev_device_new_from_syspath(m->udev, sysfs);
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek if (!udev_device_has_tag(d, "seat")) {
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek id_for_seat = udev_device_get_property_value(d, "ID_FOR_SEAT");
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen if (asprintf(&file, "/etc/udev/rules.d/72-seat-%s.rules", id_for_seat) < 0) {
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen if (asprintf(&rule, "TAG==\"seat\", ENV{ID_FOR_SEAT}==\"%s\", ENV{ID_SEAT}=\"%s\"", id_for_seat, seat) < 0) {
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen log_warning("Failed to open /etc/udev/rules.d: %m");
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering if (unlinkat(dirfd(d), de->d_name, 0) < 0)
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering log_warning("Failed to unlink %s: %m", de->d_name);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poetteringstatic const BusProperty bus_login_manager_properties[] = {
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "ControlGroupHierarchy", bus_property_append_string, "s", offsetof(Manager, cgroup_path), true },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "Controllers", bus_property_append_strv, "as", offsetof(Manager, controllers), true },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "ResetControllers", bus_property_append_strv, "as", offsetof(Manager, reset_controllers), true },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "NAutoVTs", bus_property_append_unsigned, "u", offsetof(Manager, n_autovts) },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "KillOnlyUsers", bus_property_append_strv, "as", offsetof(Manager, kill_only_users), true },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "KillExcludeUsers", bus_property_append_strv, "as", offsetof(Manager, kill_exclude_users), true },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "KillUserProcesses", bus_property_append_bool, "b", offsetof(Manager, kill_user_processes) },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "IdleHint", bus_manager_append_idle_hint, "b", 0 },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "IdleSinceHint", bus_manager_append_idle_hint_since, "t", 0 },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering { "IdleSinceHintMonotonic", bus_manager_append_idle_hint_since, "t", 0 },
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poetteringstatic DBusHandlerResult manager_message_handler(
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "GetSession")) {
9c92ce6d67f88beb31dd6555d12ae3f632218a39Lennart Poettering return bus_send_error_reply(connection, message, &error, -EINVAL);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering session = hashmap_get(m->sessions, name);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering return bus_send_error_reply(connection, message, &error, -ENOENT);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering reply = dbus_message_new_method_return(message);
2e276efc7b0398a3086629a52970bdd4ab7252f9Zbigniew Jędrzejewski-Szmek } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "GetSessionByPID")) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering return bus_send_error_reply(connection, message, &error, -EINVAL);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering r = manager_get_session_by_pid(m, pid, &session);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering return bus_send_error_reply(connection, message, NULL, r < 0 ? r : -ENOENT);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering reply = dbus_message_new_method_return(message);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "GetUser")) {
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek return bus_send_error_reply(connection, message, &error, -EINVAL);
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek user = hashmap_get(m->users, ULONG_TO_PTR((unsigned long) uid));
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek return bus_send_error_reply(connection, message, &error, -ENOENT);
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek reply = dbus_message_new_method_return(message);
0dae31d468b1a0e22d98921f7b0dbd92fd217167Zbigniew Jędrzejewski-Szmek } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "GetSeat")) {
abf126a355e2f2b62b6c51ab3bb37895d1e3eee7Tom Gundersen return bus_send_error_reply(connection, message, &error, -EINVAL);
abf126a355e2f2b62b6c51ab3bb37895d1e3eee7Tom Gundersen return bus_send_error_reply(connection, message, &error, -ENOENT);
549c1a2564b56f2bb38f1203d59c747ea15817f3Tom Gundersen reply = dbus_message_new_method_return(message);
ff3d6560bead6879a2fed1bf99bfe8273b3723f1Zbigniew Jędrzejewski-Szmek } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ListSessions")) {
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek reply = dbus_message_new_method_return(message);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek dbus_message_iter_init_append(reply, &iter);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(susso)", &sub))
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek HASHMAP_FOREACH(session, m->sessions, i) {
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2))
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen if (!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &session->id) ||
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT32, &uid) ||
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &session->user->name) ||
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, session->seat ? (const char**) &session->seat->id : &empty) ||
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &p)) {
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_close_container(&sub, &sub2))
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_close_container(&iter, &sub))
7c6423e19136a7b7b6ef3fe06b94822e582dda27Tom Gundersen } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ListUsers")) {
151226ab4bf276d60d51864330a99f886b923697Zbigniew Jędrzejewski-Szmek reply = dbus_message_new_method_return(message);
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(uso)", &sub))
50f1e641a93cacfc693b0c3d300bee5df0c8c460Tom Gundersen if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2))
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen if (!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_UINT32, &uid) ||
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &user->name) ||
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &p)) {
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen if (!dbus_message_iter_close_container(&sub, &sub2))
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen if (!dbus_message_iter_close_container(&iter, &sub))
f5430a3ef308f3a102899fcaf7fbece757082f2aLennart Poettering } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ListSeats")) {
5d45a8808431987c370706d365fb0cc95cf03d52Tom Gundersen reply = dbus_message_new_method_return(message);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek dbus_message_iter_init_append(reply, &iter);
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "(so)", &sub))
8db0d2f5c37e7e8f5bfce016cfdad7947a3ea939Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_open_container(&sub, DBUS_TYPE_STRUCT, NULL, &sub2))
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering if (!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, &seat->id) ||
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering !dbus_message_iter_append_basic(&sub2, DBUS_TYPE_OBJECT_PATH, &p)) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering if (!dbus_message_iter_close_container(&sub, &sub2))
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering if (!dbus_message_iter_close_container(&iter, &sub))
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "CreateSession")) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering r = bus_manager_create_session(m, message, &reply);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering /* Don't delay the work on OOM here, since it might be
816b4547dac1b052239ad6ee3801c78c691e5cb4Daniel Mack * triggered by a low RLIMIT_NOFILE here (since we
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering * send a dupped fd to the client), and we'd rather
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering * see this fail quickly then be retried later */
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering return bus_send_error_reply(connection, message, &error, r);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ActivateSession")) {
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering return bus_send_error_reply(connection, message, &error, -EINVAL);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering session = hashmap_get(m->sessions, name);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering return bus_send_error_reply(connection, message, &error, -ENOENT);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering return bus_send_error_reply(connection, message, NULL, r);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering reply = dbus_message_new_method_return(message);
2001c80560e3dae69e14fd994d3978c187af48b8Lennart Poettering } else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ActivateSessionOnSeat")) {
if (!dbus_message_get_args(
&error,
if (!session)
if (!seat)
if (!reply)
goto oom;
const char *name;
if (!dbus_message_get_args(
&error,
if (!session)
goto oom;
if (!reply)
goto oom;
const char *swho;
const char *name;
if (!dbus_message_get_args(
&error,
if (who < 0)
if (!session)
if (!reply)
goto oom;
if (!dbus_message_get_args(
&error,
if (!user)
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "TerminateSession")) {
const char *name;
if (!dbus_message_get_args(
&error,
if (!session)
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "TerminateUser")) {
if (!dbus_message_get_args(
&error,
if (!user)
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "TerminateSeat")) {
const char *name;
if (!dbus_message_get_args(
&error,
if (!seat)
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "SetUserLinger")) {
char *path;
if (!dbus_message_get_args(
&error,
DBUS_TYPE_BOOLEAN, &b,
errno = 0;
if (!pw)
r = verify_polkit(connection, message, "org.freedesktop.login1.set-user-linger", interactive, &error);
if (!path)
goto oom;
User *u;
user_start(u);
User *u;
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "AttachDevice")) {
if (!dbus_message_get_args(
&error,
r = verify_polkit(connection, message, "org.freedesktop.login1.attach-device", interactive, &error);
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "FlushDevices")) {
if (!dbus_message_get_args(
&error,
r = verify_polkit(connection, message, "org.freedesktop.login1.flush-devices", interactive, &error);
r = flush_devices(m);
if (!reply)
goto oom;
bool multiple_sessions;
const char *name;
const char *action;
if (!dbus_message_get_args(
&error,
if (!multiple_sessions) {
Session *s;
unsigned long ul;
if (multiple_sessions)
if (multiple_sessions)
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
if (!forward)
if (!freply)
if (!reply)
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.DBus.Introspectable", "Introspect")) {
FILE *f;
Iterator i;
goto oom;
goto oom;
free(p);
free(p);
if (ferror(f)) {
fclose(f);
goto oom;
fclose(f);
if (!introspection)
goto oom;
goto oom;
{ NULL, }
if (reply) {
goto oom;
return DBUS_HANDLER_RESULT_HANDLED;
oom:
if (reply)
return DBUS_HANDLER_RESULT_NEED_MEMORY;
void *userdata) {
assert(m);
const char *cgroup;
DBusMessage *m;
int r = -ENOMEM;
m = bus_properties_changed_new("/org/freedesktop/login1", "org.freedesktop.login1.Manager", properties);
goto finish;
goto finish;