logind-dbus.c revision 770858811930c0658b189d980159ea1ac5663467
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering This file is part of systemd.
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering Copyright 2011 Lennart Poettering
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering systemd is free software; you can redistribute it and/or modify it
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering under the terms of the GNU Lesser General Public License as published by
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering (at your option) any later version.
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering systemd is distributed in the hope that it will be useful, but
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering Lesser General Public License for more details.
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering You should have received a copy of the GNU Lesser General Public License
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <interface name=\"org.freedesktop.login1.Manager\">\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <method name=\"GetSession\">\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"session\" type=\"o\" direction=\"out\"/>\n" \
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek " </method>\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <method name=\"GetSessionByPID\">\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"pid\" type=\"u\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"session\" type=\"o\" direction=\"out\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " </method>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <method name=\"GetUser\">\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <arg name=\"user\" type=\"o\" direction=\"out\"/>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " </method>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <method name=\"GetSeat\">\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"seat\" type=\"o\" direction=\"out\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " </method>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <method name=\"ListSessions\">\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"sessions\" type=\"a(susso)\" direction=\"out\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " </method>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <method name=\"ListUsers\">\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <arg name=\"users\" type=\"a(uso)\" direction=\"out\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " </method>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <method name=\"ListSeats\">\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"seats\" type=\"a(so)\" direction=\"out\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " </method>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <method name=\"CreateSession\">\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"leader\" type=\"u\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"sevice\" type=\"s\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"type\" type=\"s\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"class\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"in\"/>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"tty\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"display\" type=\"s\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"remote\" type=\"b\" direction=\"in\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <arg name=\"remote_user\" type=\"s\" direction=\"in\"/>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"remote_host\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"controllers\" type=\"as\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"reset_controllers\" type=\"as\" direction=\"in\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"kill_processes\" type=\"b\" direction=\"in\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"out\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <arg name=\"path\" type=\"o\" direction=\"out\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"runtime_path\" type=\"o\" direction=\"out\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <arg name=\"seat\" type=\"s\" direction=\"out\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " <arg name=\"vtnr\" type=\"u\" direction=\"out\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <arg name=\"existing\" type=\"b\" direction=\"out\"/>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " </method>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <method name=\"ReleaseSession\">\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " </method>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " <method name=\"ActivateSession\">\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " </method>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <method name=\"ActivateSessionOnSeat\">\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " </method>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <method name=\"LockSession\">\n" \
d7bd3de0654669e65b9642c248c5fa6d1d9a9f61Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
d4fffc4b8beb86e77fd710c1f43913a490ed083aZbigniew Jędrzejewski-Szmek " </method>\n" \
320814811417146cfa1e416f69f1101eed630c36Luke Shumaker " <method name=\"UnlockSession\">\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " </method>\n" \
6c03089c32c251d823173bda4d809a9e643219f0Lennart Poettering " <method name=\"LockSessions\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <method name=\"KillSession\">\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " </method>\n" \
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek " <method name=\"KillUser\">\n" \
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " </method>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " <method name=\"TerminateSession\">\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " </method>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <method name=\"TerminateUser\">\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " </method>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <method name=\"TerminateSeat\">\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " </method>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <method name=\"SetUserLinger\">\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"b\" type=\"b\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " </method>\n" \
374ec6abf31ada6ca554cc8ea99b282373fac010Lennart Poettering " <method name=\"AttachDevice\">\n" \
cfeaa44a09756a93a881f786678973d9b1e382dbLennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"sysfs\" type=\"s\" direction=\"in\"/>\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " </method>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <method name=\"FlushDevices\">\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " </method>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <method name=\"PowerOff\">\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " </method>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <method name=\"Reboot\">\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " </method>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <method name=\"Suspend\">\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " </method>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <method name=\"Hibernate\">\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " </method>\n" \
8b0849e9710d721c5d0b775aaf0fd662eefa1449Lennart Poettering " <method name=\"CanPowerOff\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " </method>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <method name=\"CanReboot\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " </method>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <method name=\"CanSuspend\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " </method>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <method name=\"CanHibernate\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " </method>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <method name=\"Inhibit\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"what\" type=\"s\" direction=\"in\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"why\" type=\"s\" direction=\"in\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " </method>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <method name=\"ListInhibitors\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"inhibitors\" type=\"a(ssssuu)\" direction=\"out\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " </method>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <signal name=\"SessionNew\">\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
329ac4bc5429cd86c4ac76b13e7e2784f3982760Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " </signal>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <signal name=\"SessionRemoved\">\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
9444b1f20e311f073864d81e913bd4f32fe95cfdLennart Poettering " </signal>\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <signal name=\"UserNew\">\n" \
7027ff61a34a12487712b382a061c654acc3a679Lennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " </signal>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <signal name=\"UserRemoved\">\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " </signal>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <signal name=\"SeatNew\">\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
e9174f29c7e3ee45137537b126458718913a3ec5Lennart Poettering " </signal>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <signal name=\"SeatRemoved\">\n" \
fed1e721fd0c81e60c77120539f34e16c2585634Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " </signal>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <signal name=\"PrepareForShutdown\">\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"active\" type=\"b\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " </signal>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <signal name=\"PrepareForSleep\">\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <arg name=\"active\" type=\"b\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " </signal>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"ControlGroupHierarchy\" type=\"s\" access=\"read\"/>\n" \
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering " <property name=\"Controllers\" type=\"as\" access=\"read\"/>\n" \
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering " <property name=\"ResetControllers\" type=\"as\" access=\"read\"/>\n" \
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering " <property name=\"NAutoVTs\" type=\"u\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"KillOnlyUsers\" type=\"as\" access=\"read\"/>\n" \
e9174f29c7e3ee45137537b126458718913a3ec5Lennart Poettering " <property name=\"KillExcludeUsers\" type=\"as\" access=\"read\"/>\n" \
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering " <property name=\"KillUserProcesses\" type=\"b\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"IdleHint\" type=\"b\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"IdleSinceHint\" type=\"t\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"IdleSinceHintMonotonic\" type=\"t\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"BlockInhibited\" type=\"s\" access=\"read\"/>\n" \
1021b21bc6f8dd522b46116e8598b17f9f93f1b7Lennart Poettering " <property name=\"DelayInhibited\" type=\"s\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"InhibitDelayMaxUSec\" type=\"t\" access=\"read\"/>\n" \
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek " <property name=\"HandlePowerKey\" type=\"s\" access=\"read\"/>\n" \
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek " <property name=\"HandleSuspendKey\" type=\"s\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"HandleHibernateKey\" type=\"s\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"HandleLidSwitch\" type=\"s\" access=\"read\"/>\n" \
de0671ee7fe465e108f62dcbbbe9366f81dd9e9aZbigniew Jędrzejewski-Szmek " <property name=\"PreparingForShutdown\" type=\"b\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " <property name=\"PreparingForSleep\" type=\"b\" access=\"read\"/>\n" \
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering " </interface>\n"
1021b21bc6f8dd522b46116e8598b17f9f93f1b7Lennart Poettering DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poettering "org.freedesktop.login1.Manager\0"
ae018d9bc900d6355dea4af05119b49c67945184Lennart Poetteringstatic int bus_manager_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
a0ab566574303be1ca12cdb334f284cfd407caa5Lennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
185a08745957cbd32e8293daf8c51ab9c995a71eDimitri John Ledkovstatic int bus_manager_append_idle_hint_since(DBusMessageIter *i, const char *property, void *data) {
78edb35ab4f4227485cb9ec816b43c37e0d5e62aLennart Poettering u = streq(property, "IdleSinceHint") ? t.realtime : t.monotonic;
a016b9228f338cb9b380ce7e00826ef462767d98Lennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, &u))
a016b9228f338cb9b380ce7e00826ef462767d98Lennart Poetteringstatic int bus_manager_append_inhibited(DBusMessageIter *i, const char *property, void *data) {
a016b9228f338cb9b380ce7e00826ef462767d98Lennart Poettering const char *p;
a016b9228f338cb9b380ce7e00826ef462767d98Lennart Poettering w = manager_inhibit_what(m, streq(property, "BlockInhibited") ? INHIBIT_BLOCK : INHIBIT_DELAY);
c96cc5822c165e86be78ed96dac6573986032fabLennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &p))
a016b9228f338cb9b380ce7e00826ef462767d98Lennart Poetteringstatic int bus_manager_append_preparing(DBusMessageIter *i, const char *property, void *data) {
751bc6ac79320bc16e63e8c1bbb713c30a3b7bc9Lennart Poettering if (streq(property, "PreparingForShutdown"))
751bc6ac79320bc16e63e8c1bbb713c30a3b7bc9Lennart Poettering b = !!(m->delayed_what & INHIBIT_SHUTDOWN);
751bc6ac79320bc16e63e8c1bbb713c30a3b7bc9Lennart Poettering dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b);
751bc6ac79320bc16e63e8c1bbb713c30a3b7bc9Lennart Poetteringstatic int bus_manager_create_session(Manager *m, DBusMessage *message, DBusMessage **_reply) {
5f4c5fef66581383ee852b301db67f687663004cLennart Poettering const char *type, *class, *seat, *tty, *display, *remote_user, *remote_host, *service;
5f4c5fef66581383ee852b301db67f687663004cLennart Poettering dbus_bool_t remote, kill_processes, exists;
5f4c5fef66581383ee852b301db67f687663004cLennart Poettering char **controllers = NULL, **reset_controllers = NULL;
143bfdaf0b890fa7acadf02d1eafacaef1b696bdHolger Hans Peter Freyther if (!dbus_message_iter_init(message, &iter) ||
aff38e74bd776471f15ba54b305a24b0251eb865Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
a016b9228f338cb9b380ce7e00826ef462767d98Lennart Poettering dbus_message_iter_get_basic(&iter, &uid);
96cde13ace6406582688028f3df5668a172ba628Zbigniew Jędrzejewski-Szmek dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
if (leader <= 0 ||
return -EINVAL;
return -EINVAL;
return -EINVAL;
c = SESSION_USER;
return -EINVAL;
s = NULL;
return -ENOENT;
return -EINVAL;
return -EINVAL;
s = m->vtconsole;
else if (s != m->vtconsole)
return -EINVAL;
return v < 0 ? v : -EINVAL;
if (vtnr <= 0)
return -EINVAL;
s = m->vtconsole;
else if (s != m->vtconsole)
return -EINVAL;
if (vtnr != 0)
return -EINVAL;
return -EINVAL;
if (seat_can_multi_session(s)) {
return -EINVAL;
if (vtnr != 0)
return -EINVAL;
return -EINVAL;
return -EINVAL;
return -EINVAL;
return -EINVAL;
return -EINVAL;
return -EINVAL;
r = -EINVAL;
goto fail;
goto fail;
r = -EINVAL;
goto fail;
goto fail;
if (audit_id > 0) {
if (!id) {
r = -ENOMEM;
goto fail;
if (session) {
if (fifo_fd < 0) {
r = fifo_fd;
goto fail;
if (!reply) {
r = -ENOMEM;
goto fail;
r = -ENOMEM;
goto fail;
exists = true;
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;
exists = false;
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;
r = -EINVAL;
goto fail;
w == INHIBIT_SHUTDOWN ? (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-shutdown" : "org.freedesktop.login1.inhibit-delay-shutdown") :
w == INHIBIT_SLEEP ? (mm == INHIBIT_BLOCK ? "org.freedesktop.login1.inhibit-block-sleep" : "org.freedesktop.login1.inhibit-delay-sleep") :
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;
assert(m);
return bus_method_call_with_reply (
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
NULL,
NULL,
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;
unsigned long ul;
assert(m);
assert(w >= 0);
if (sleep_type) {
goto finish;
return -EIO;
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;
static int bus_manager_log_shutdown(
Manager *m,
InhibitWhat w,
const char *unit_name) {
assert(m);
if (w != INHIBIT_SHUTDOWN)
q = NULL;
q, NULL);
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,
unsigned long ul;
assert(m);
assert(w >= 0);
if (!dbus_message_get_args(
return -EINVAL;
if (sleep_type) {
return -ENOTSUP;
return -EIO;
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 },
{ "HandleSuspendKey", bus_manager_append_handle_button, "s", offsetof(Manager, handle_suspend_key) },
{ "HandleHibernateKey", bus_manager_append_handle_button, "s", offsetof(Manager, handle_hibernate_key)},
{ 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;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "LockSessions")) {
Iterator i;
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)