logind-dbus.c revision 405e0255d5e6950180d9563f1a26294b5360db03
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering This file is part of systemd.
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering Copyright 2011 Lennart Poettering
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering systemd is free software; you can redistribute it and/or modify it
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering under the terms of the GNU Lesser General Public License as published by
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering (at your option) any later version.
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering systemd is distributed in the hope that it will be useful, but
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering Lesser General Public License for more details.
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering You should have received a copy of the GNU Lesser General Public License
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <interface name=\"org.freedesktop.login1.Manager\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"GetSession\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"session\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"GetSessionByPID\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"pid\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"session\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"GetUser\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"user\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"GetUserByPID\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"pid\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"user\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"GetSeat\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"seat\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ListSessions\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"sessions\" type=\"a(susso)\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ListUsers\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"users\" type=\"a(uso)\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ListSeats\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"seats\" type=\"a(so)\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"CreateSession\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"leader\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"service\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"type\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"class\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"tty\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"display\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"remote\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"remote_user\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"remote_host\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"scope_properties\" type=\"a(sv)\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"path\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"runtime_path\" type=\"o\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"vtnr\" type=\"u\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"existing\" type=\"b\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ReleaseSession\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ActivateSession\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ActivateSessionOnSeat\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"LockSession\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"UnlockSession\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"LockSessions\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"UnlockSessions\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"KillSession\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"KillUser\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"signal\" type=\"s\" direction=\"in\"/>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " </method>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <method name=\"TerminateSession\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"TerminateUser\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"TerminateSeat\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"SetUserLinger\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"uid\" type=\"u\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"b\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"AttachDevice\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"seat\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"sysfs\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"FlushDevices\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"PowerOff\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <method name=\"Reboot\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " </method>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <method name=\"Suspend\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " </method>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <method name=\"Hibernate\">\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"HybridSleep\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"interactive\" type=\"b\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"CanPowerOff\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"CanReboot\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"CanSuspend\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"CanHibernate\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"CanHybridSleep\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"result\" type=\"s\" direction=\"out\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"Inhibit\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"what\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"who\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"why\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"mode\" type=\"s\" direction=\"in\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"fd\" type=\"h\" direction=\"out\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </method>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <method name=\"ListInhibitors\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"inhibitors\" type=\"a(ssssuu)\" direction=\"out\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " </method>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <signal name=\"SessionNew\">\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " </signal>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <signal name=\"SessionRemoved\">\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " </signal>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <signal name=\"UserNew\">\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
9833a66c7eba011c3740867c80133bc6fa976aa3Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </signal>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <signal name=\"UserRemoved\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"uid\" type=\"u\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </signal>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <signal name=\"SeatNew\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </signal>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <signal name=\"SeatRemoved\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"id\" type=\"s\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"path\" type=\"o\"/>\n" \
f131770b1465fbf423881f16ba85523a05f846feVeres Lajos " </signal>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <signal name=\"PrepareForShutdown\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"active\" type=\"b\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </signal>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <signal name=\"PrepareForSleep\">\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <arg name=\"active\" type=\"b\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </signal>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"NAutoVTs\" type=\"u\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"KillOnlyUsers\" type=\"as\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"KillExcludeUsers\" type=\"as\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"KillUserProcesses\" type=\"b\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"IdleHint\" type=\"b\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"IdleSinceHint\" type=\"t\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"IdleSinceHintMonotonic\" type=\"t\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"BlockInhibited\" type=\"s\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"DelayInhibited\" type=\"s\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"InhibitDelayMaxUSec\" type=\"t\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"HandlePowerKey\" type=\"s\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"HandleSuspendKey\" type=\"s\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"HandleHibernateKey\" type=\"s\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"HandleLidSwitch\" type=\"s\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"IdleAction\" type=\"s\" access=\"read\"/>\n" \
78fe420ff0bb4cd94de3c4d3f15a3021cc3e2878Lennart Poettering " <property name=\"IdleActionUSec\" type=\"t\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"PreparingForShutdown\" type=\"b\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " <property name=\"PreparingForSleep\" type=\"b\" access=\"read\"/>\n" \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering " </interface>\n"
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE \
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering "org.freedesktop.login1.Manager\0"
875c2e220e2611165e09051c4747971811f1de58Lennart Poetteringstatic int bus_manager_append_idle_hint(DBusMessageIter *i, const char *property, void *data) {
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b))
875c2e220e2611165e09051c4747971811f1de58Lennart Poetteringstatic int bus_manager_append_idle_hint_since(DBusMessageIter *i, const char *property, void *data) {
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering u = streq(property, "IdleSinceHint") ? t.realtime : t.monotonic;
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, &u))
875c2e220e2611165e09051c4747971811f1de58Lennart Poetteringstatic int bus_manager_append_inhibited(DBusMessageIter *i, const char *property, void *data) {
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering const char *p;
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering w = manager_inhibit_what(m, streq(property, "BlockInhibited") ? INHIBIT_BLOCK : INHIBIT_DELAY);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering if (!dbus_message_iter_append_basic(i, DBUS_TYPE_STRING, &p))
875c2e220e2611165e09051c4747971811f1de58Lennart Poetteringstatic int bus_manager_append_preparing(DBusMessageIter *i, const char *property, void *data) {
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering if (streq(property, "PreparingForShutdown"))
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering b = !!(m->action_what & INHIBIT_SHUTDOWN);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_append_basic(i, DBUS_TYPE_BOOLEAN, &b);
875c2e220e2611165e09051c4747971811f1de58Lennart Poetteringstatic int bus_manager_create_session(Manager *m, DBusMessage *message) {
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering const char *type, *class, *cseat, *tty, *display, *remote_user, *remote_host, *service;
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering if (!dbus_message_iter_init(message, &iter) ||
0b97208d8c39131f8a7cfcfccb5c40b86af44ee5Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &uid);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &leader);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &service);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &type);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &class);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &cseat);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_UINT32)
124aff6251c095367ce1323a21fa23235cbb0490Lennart Poettering dbus_message_iter_get_basic(&iter, &vtnr);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &tty);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering return v < 0 ? v : -EINVAL;
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_basic(&iter, &display);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_BOOLEAN)
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering dbus_message_iter_get_basic(&iter, &remote);
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering dbus_message_iter_get_basic(&iter, &remote_user);
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING)
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering dbus_message_iter_get_basic(&iter, &remote_host);
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering leader = bus_get_unix_process_id(m->bus, dbus_message_get_sender(message), NULL);
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering r = manager_get_session_by_pid(m, leader, &session);
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering _cleanup_dbus_message_unref_ DBusMessage *reply = NULL;
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering /* Session already exists, client is probably
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering * something like "su" which changes uid but is still
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering * the same session */
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering reply = dbus_message_new_method_return(message);
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering cseat = session->seat ? session->seat->id : "";
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering DBUS_TYPE_STRING, &session->user->runtime_path,
875c2e220e2611165e09051c4747971811f1de58Lennart Poettering if (!dbus_connection_send(m->bus, reply, NULL)) {
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering /* Keep our session IDs and the audit session IDs in sync */
4d9ced9956755901238fede6fc5a3d7e4e816aa6Lennart Poettering if (asprintf(&id, "%lu", (unsigned long) audit_id) < 0) {
audit_id = 0;
if (!id) {
r = -ENOMEM;
goto fail;
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 (seat) {
goto fail;
goto fail;
fail:
if (session)
if (user)
static int bus_manager_inhibit(
Manager *m,
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;
if (m->action_what & w) {
r = -EALREADY;
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)
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);
assert(m);
static int have_multiple_sessions(
Manager *m,
Iterator i;
assert(m);
static int bus_manager_log_shutdown(
Manager *m,
InhibitWhat w,
const char *unit_name) {
assert(m);
if (w != INHIBIT_SHUTDOWN)
q = NULL;
q, NULL);
static int execute_shutdown_or_sleep(
Manager *m,
InhibitWhat w,
const char *unit_name,
assert(m);
assert(w >= 0);
m->bus,
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
&reply,
if (!dbus_message_get_args(
return -EINVAL;
c = strdup(p);
return -ENOMEM;
m->action_job = c;
m->action_what = w;
static int delay_shutdown_or_sleep(
Manager *m,
InhibitWhat w,
const char *unit_name) {
assert(m);
assert(w >= 0);
m->action_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_verb,
unsigned long ul;
assert(m);
assert(w >= 0);
if (sleep_verb) {
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;
assert(m);
assert(w >= 0);
message = dbus_message_new_signal("/org/freedesktop/login1", "org.freedesktop.login1.Manager", signal_name[w]);
if (!message)
return -ENOMEM;
return -ENOMEM;
Manager *m,
const char *unit_name,
InhibitWhat w,
bool delayed;
assert(m);
assert(w >= 0);
send_prepare_for(m, w, true);
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_verb,
unsigned long ul;
assert(m);
assert(w >= 0);
if (m->action_what)
return -EALREADY;
if (!dbus_message_get_args(
return -EINVAL;
if (sleep_verb) {
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_action, handle_action, HandleAction);
{ "KillExcludeUsers", bus_property_append_strv, "as", offsetof(Manager, kill_exclude_users), true },
{ "HandleSuspendKey", bus_manager_append_handle_action, "s", offsetof(Manager, handle_suspend_key) },
{ "HandleHibernateKey", bus_manager_append_handle_action, "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;
} else if (dbus_message_is_method_call(message, "org.freedesktop.login1.Manager", "GetUserByPID")) {
if (!dbus_message_get_args(
&error,
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;
goto oom;
goto oom;
Iterator i;
if (!reply)
goto oom;
goto oom;
goto oom;
goto oom;
free(p);
goto oom;
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") ||
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",
"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.login1.Manager", "CanHybridSleep")) {
"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:
return DBUS_HANDLER_RESULT_NEED_MEMORY;
void *userdata) {
assert(m);
log_debug("Got message: %s %s %s", strna(dbus_message_get_sender(message)), strna(dbus_message_get_interface(message)), strna(dbus_message_get_member(message)));
goto finish;
m->action_what = 0;
Session *s;
User *u;
if (s->started) {
dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
session_save(s);
user_save(u);
} else if (dbus_message_is_signal(message, "org.freedesktop.DBus.Properties", "PropertiesChanged")) {
const char *path;
if (!path)
goto finish;
if (unit) {
Session *s;
User *u;
goto finish;
if (session)
if (user)
dbus_bool_t b;
DBUS_TYPE_BOOLEAN, &b,
goto finish;
Iterator i;
return -ENOMEM;
return -ENOMEM;
int manager_start_scope(
const char *scope,
const char *slice,
const char *description,
const char *after,
const char *kill_mode,
char **job) {
const char *timeout_stop_property = "TimeoutStopUSec", *send_sighup_property = "SendSIGHUP", *pids_property = "PIDs";
uint32_t u;
if (!slice)
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
return log_oom();
u = pid;
return log_oom();
return log_oom();
if (!reply)
return -EIO;
if (job) {
char *copy;
return -EIO;
if (!copy)
return -ENOMEM;
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
&reply,
if (job) {
char *copy;
return -EIO;
if (!copy)
return -ENOMEM;
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
&reply,
if (job)
if (job) {
char *copy;
return -EIO;
if (!copy)
return -ENOMEM;
int manager_kill_unit(Manager *manager, const char *unit, KillWho who, int signo, DBusError *error) {
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
"org.freedesktop.systemd1.Manager",
&reply,
DBUS_TYPE_STRING, &w,
const char *state;
if (!path)
return -ENOMEM;
"org.freedesktop.systemd1",
path,
&reply,
&error,
return -EINVAL;
return -EINVAL;