logind-dbus.c revision 5e4a79da3ac3859c2a1295e019b95a1e5589b9c1
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 Lesser General Public License as published by
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering You should have received a copy of the GNU Lesser 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" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart 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" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"ListUsers\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"users\" type=\"a(uso)\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"ListSeats\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"seats\" type=\"a(so)\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"CreateSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"leader\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"sevice\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"type\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"class\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"tty\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"display\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"remote\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"remote_user\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"remote_host\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"controllers\" type=\"as\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"reset_controllers\" type=\"as\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"kill_processes\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"path\" type=\"o\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"runtime_path\" type=\"o\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"out\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"ReleaseSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"ActivateSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"ActivateSessionOnSeat\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"LockSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"UnlockSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"KillSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"KillUser\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"TerminateSession\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"TerminateUser\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"TerminateSeat\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"SetUserLinger\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"b\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <method name=\"AttachDevice\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart 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" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " </method>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <method name=\"FlushDevices\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"PowerOff\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"Reboot\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"Suspend\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"Hibernate\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"CanPowerOff\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"CanReboot\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"CanSuspend\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"CanHibernate\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " </method>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <method name=\"Inhibit\">\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"what\" type=\"s\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"why\" type=\"s\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </method>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <method name=\"ListInhibitors\">\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"inhibitors\" type=\"a(ssssuu)\" direction=\"out\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </method>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <signal name=\"SessionNew\">\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </signal>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <signal name=\"SessionRemoved\">\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </signal>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <signal name=\"UserNew\">\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </signal>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <signal name=\"UserRemoved\">\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </signal>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <signal name=\"SeatNew\">\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " </signal>\n" \
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering " <signal name=\"SeatRemoved\">\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " </signal>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <signal name=\"PrepareForShutdown\">\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <arg name=\"active\" type=\"b\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " </signal>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <signal name=\"PrepareForSleep\">\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <arg name=\"active\" type=\"b\"/>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " </signal>\n" \
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poettering " <property name=\"ControlGroupHierarchy\" type=\"s\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"Controllers\" type=\"as\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"ResetControllers\" type=\"as\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"NAutoVTs\" type=\"u\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"KillOnlyUsers\" type=\"as\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"KillExcludeUsers\" type=\"as\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"KillUserProcesses\" type=\"b\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"IdleHint\" type=\"b\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"IdleSinceHint\" type=\"t\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"IdleSinceHintMonotonic\" type=\"t\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"BlockInhibited\" type=\"s\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"DelayInhibited\" type=\"s\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"InhibitDelayMaxUSec\" type=\"t\" access=\"read\"/>\n" \
8bf52d3d17d364438191077d0750b8b80b5dc53aLennart Poettering " <property name=\"HandlePowerKey\" type=\"s\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"HandleSleepKey\" type=\"s\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"HandleLidSwitch\" type=\"s\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"PreparingForShutdown\" type=\"b\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " <property name=\"PreparingForSleep\" type=\"b\" access=\"read\"/>\n" \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering " </interface>\n"
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
74b2466e14a1961bf3ac0e8a60cfaceec705bd59Lennart Poettering "org.freedesktop.login1.Manager\0"
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic int bus_manager_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
faa133f3aa7a18f26563dc5d6b95898cb315c37aLennart Poetteringstatic int bus_manager_append_idle_hint_since(DBusMessageIter *i, const char *property, void *data) {
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering u = streq(property, "IdleSinceHint") ? t.realtime : t.monotonic;
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, &u))
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poetteringstatic int bus_manager_append_inhibited(DBusMessageIter *i, const char *property, void *data) {
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering const char *p;
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering w = manager_inhibit_what(m, streq(property, "BlockInhibited") ? INHIBIT_BLOCK : INHIBIT_DELAY);
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &p))
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poetteringstatic int bus_manager_append_preparing(DBusMessageIter *i, const char *property, void *data) {
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering if (streq(property, "PreparingForShutdown"))
623a4c97b9175f95c4b1c6fc34e36c56f1e4ddbfLennart Poettering b = !!(m->delayed_what & INHIBIT_SHUTDOWN);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poetteringstatic int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMessage **_reply) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering const char *type, *class, *seat, *tty, *display, *remote_user, *remote_host, *service;
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering char **controllers = NULL, **reset_controllers = NULL;
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering if (!dbus_message_iter_init(message, &iter) ||
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering dbus_message_iter_get_basic(&iter, &uid);
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
7e8e0422aeb16f2a09a40546c61df753d10029b6Lennart Poettering dbus_message_iter_get_basic(&iter, &leader);
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek !dbus_message_iter_next(&iter) ||
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &service);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &type);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &class);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_basic(&iter, &seat);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &vtnr);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering 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)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering return v < 0 ? v : -EINVAL;
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering else if (s != m->vtconsole)
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek } else if (!isempty(tty) && s && seat_is_vtconsole(s))
946c70944ebdf428ffeb9991a7449edbd4011461Zbigniew Jędrzejewski-Szmek if (seat_can_multi_session(s)) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &display);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &remote);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_basic(&iter, &remote_user);
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &remote_host);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
322345fdb9865ef2477fba8e4bdde0e1183ef505Lennart Poettering dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_STRING)
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering r = bus_parse_strv_iter(&iter, &controllers);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering if (strv_contains(controllers, "systemd") ||
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_ARRAY ||
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_element_type(&iter) != DBUS_TYPE_STRING) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering r = bus_parse_strv_iter(&iter, &reset_controllers);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering if (strv_contains(reset_controllers, "systemd") ||
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN) {
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering dbus_message_iter_get_basic(&iter, &kill_processes);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering r = manager_add_user_by_uid(m, uid, &user);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering audit_session_from_pid(leader, &audit_id);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering asprintf(&id, "%lu", (unsigned long) audit_id);
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering /* Session already exists, client is probably
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering * something like "su" which changes uid but
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering * is still the same audit session */
2d4c5cbc0ed3ccb09dc086a040088b454c22c644Lennart Poettering reply = dbus_message_new_method_return(message);
r = -ENOMEM;
goto fail;
free(p);
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
goto fail;
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
if (fifo_fd < 0) {
r = fifo_fd;
goto fail;
goto fail;
goto fail;
if (!reply) {
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
free(p);
r = -ENOMEM;
goto fail;
fail:
if (session)
if (user)
if (fifo_fd >= 0)
if (reply)
static int bus_manager_inhibit(Manager *m, DBusConnection *connection, DBusMessage *message, DBusError *error, DBusMessage **_reply) {
InhibitWhat w;
unsigned long ul;
assert(m);
if (!dbus_message_get_args(
r = -EIO;
goto fail;
r = -EINVAL;
goto fail;
if (mm < 0) {
r = -EINVAL;
goto fail;
m == INHIBIT_BLOCK ?
goto fail;
r = -EIO;
goto fail;
if (pid <= 0) {
r = -EIO;
goto fail;
r = -ENOMEM;
goto fail;
goto fail;
i->what = w;
r = -ENOMEM;
goto fail;
if (fifo_fd < 0) {
r = fifo_fd;
goto fail;
if (!reply) {
r = -ENOMEM;
goto fail;
if (!dbus_message_append_args(
r = -ENOMEM;
goto fail;
inhibitor_start(i);
fail:
inhibitor_free(i);
if (fifo_fd >= 0)
if (reply)
struct udev_enumerate *e;
assert(m);
r = -ENOMEM;
goto finish;
if (udev_enumerate_add_match_parent(e, d) < 0) {
r = -EIO;
goto finish;
if (udev_enumerate_scan_devices(e) < 0) {
r = -EIO;
goto finish;
r = -ENOMEM;
goto finish;
free(t);
struct udev_device *d;
const char *id_for_seat;
assert(m);
return -ENODEV;
r = -ENODEV;
goto finish;
if (!id_for_seat) {
r = -ENODEV;
goto finish;
r = -ENOMEM;
goto finish;
if (asprintf(&rule, "TAG==\"seat\", ENV{ID_FOR_SEAT}==\"%s\", ENV{ID_SEAT}=\"%s\"", id_for_seat, seat) < 0) {
r = -ENOMEM;
goto finish;
goto finish;
r = trigger_device(m, d);
DIR *d;
assert(m);
closedir(d);
static int have_multiple_sessions(
Manager *m,
Iterator i;
unsigned long ul;
assert(m);
return -EIO;
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
if (!message)
return -ENOMEM;
return -ENOMEM;
if (!reply)
return -EIO;
assert(m);
assert(w >= 0);
message = dbus_message_new_signal("/org/freedesktop/login1", "org.freedesktop.login1.Manager", signal_name[w]);
if (!message)
return -ENOMEM;
r = -ENOMEM;
assert(m);
assert(w >= 0);
send_prepare_for(m, w, true);
if (!m->delayed_unit)
m->delayed_what = w;
static int bus_manager_can_shutdown_or_sleep(
Manager *m,
InhibitWhat w,
const char *action,
const char *action_multiple_sessions,
const char *action_ignore_inhibit,
const char *sleep_type,
const char *result;
assert(m);
assert(w >= 0);
if (sleep_type) {
goto finish;
multiple_sessions = r > 0;
if (multiple_sessions) {
else if (challenge)
if (blocked) {
if (r > 0 && !result)
else if (challenge)
if (!reply)
return -ENOMEM;
return -ENOMEM;
Manager *m,
const char *unit_name,
InhibitWhat w,
bool delayed;
assert(m);
assert(w >= 0);
delayed =
m->inhibit_delay_max > 0 &&
if (delayed)
static int bus_manager_do_shutdown_or_sleep(
Manager *m,
const char *unit_name,
InhibitWhat w,
const char *action,
const char *action_multiple_sessions,
const char *action_ignore_inhibit,
const char *sleep_type,
assert(m);
assert(w >= 0);
if (!dbus_message_get_args(
return -EINVAL;
if (sleep_type) {
return -ENOTSUP;
multiple_sessions = r > 0;
if (multiple_sessions) {
if (blocked) {
if (!reply)
return -ENOMEM;
static DEFINE_BUS_PROPERTY_APPEND_ENUM(bus_manager_append_handle_button, handle_button, HandleButton);
{ "KillExcludeUsers", bus_property_append_strv, "as", offsetof(Manager, kill_exclude_users), true },
{ NULL, }
void *userdata) {
assert(m);
const char *name;
if (!dbus_message_get_args(
&error,
if (!session)
if (!reply)
goto oom;
goto oom;
free(p);
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "GetSessionByPID")) {
if (!dbus_message_get_args(
&error,
if (!reply)
goto oom;
goto oom;
free(p);
goto oom;
if (!dbus_message_get_args(
&error,
if (!user)
if (!reply)
goto oom;
goto oom;
free(p);
goto oom;
const char *name;
if (!dbus_message_get_args(
&error,
if (!seat)
if (!reply)
goto oom;
goto oom;
free(p);
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ListSessions")) {
Iterator i;
if (!reply)
goto oom;
goto oom;
goto oom;
goto oom;
!dbus_message_iter_append_basic(&sub2, DBUS_TYPE_STRING, session->seat ? (const char**) &session->seat->id : &empty) ||
free(p);
goto oom;
free(p);
goto oom;
goto oom;
Iterator i;
if (!reply)
goto oom;
goto oom;
goto oom;
goto oom;
free(p);
goto oom;
free(p);
goto oom;
goto oom;
Iterator i;
if (!reply)
goto oom;
goto oom;
goto oom;
goto oom;
free(p);
goto oom;
free(p);
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ListInhibitors")) {
Iterator i;
if (!reply)
goto oom;
goto oom;
goto oom;
goto oom;
goto oom;
goto oom;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "CreateSession")) {
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "ReleaseSession")) {
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", "ActivateSession")) {
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", "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, NULL, &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, NULL, &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, NULL, &error);
r = flush_devices(m);
if (!reply)
goto oom;
NULL,
NULL,
"org.freedesktop.login1.suspend",
"org.freedesktop.login1.suspend-multiple-sessions",
"org.freedesktop.login1.suspend-ignore-inhibit",
"org.freedesktop.login1.hibernate",
"org.freedesktop.login1.hibernate-multiple-sessions",
"org.freedesktop.login1.hibernate-ignore-inhibit",
NULL,
NULL,
"org.freedesktop.login1.suspend",
"org.freedesktop.login1.suspend-multiple-sessions",
"org.freedesktop.login1.suspend-ignore-inhibit",
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "CanHibernate")) {
"org.freedesktop.login1.hibernate",
"org.freedesktop.login1.hibernate-multiple-sessions",
"org.freedesktop.login1.hibernate-ignore-inhibit",
} 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;
const char *unit_name;
bool delayed;
delayed =
if (delayed)