dbus-snapshot.c revision 1d22e9068c52c1cf935bcdff70b9b9654e3c939e
97a9a944b5887e91042b019776c41d5dd74557aferikabele/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive This file is part of systemd.
a945f35eff8b6a88009ce73de6d4c862ce58de3cslive Copyright 2010 Lennart Poettering
b686b6a420bde7f78c416b90be11db94cb789979nd systemd is free software; you can redistribute it and/or modify it
b686b6a420bde7f78c416b90be11db94cb789979nd under the terms of the GNU Lesser General Public License as published by
b686b6a420bde7f78c416b90be11db94cb789979nd the Free Software Foundation; either version 2.1 of the License, or
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen (at your option) any later version.
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen systemd is distributed in the hope that it will be useful, but
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen WITHOUT ANY WARRANTY; without even the implied warranty of
b686b6a420bde7f78c416b90be11db94cb789979nd MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
b686b6a420bde7f78c416b90be11db94cb789979nd Lesser General Public License for more details.
d229f940abfb2490dee17979e9a5ff31b7012eb5rbowen You should have received a copy of the GNU Lesser General Public License
3f08db06526d6901aa08c110b5bc7dde6bc39905nd along with systemd; If not, see <http://www.gnu.org/licenses/>.
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0ndint bus_snapshot_method_remove(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
b686b6a420bde7f78c416b90be11db94cb789979nd r = mac_selinux_unit_access_check(UNIT(s), message, "stop", error);
b686b6a420bde7f78c416b90be11db94cb789979nd if (r < 0)
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen r = bus_verify_manage_units_async(UNIT(s)->manager, message, error);
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf if (r == 0)
fd09dcc9b954fde7abde7955af4ba9a094d34d50rbowen return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
b686b6a420bde7f78c416b90be11db94cb789979nd SD_BUS_PROPERTY("Cleanup", "b", bus_property_get_bool, offsetof(Snapshot, cleanup), SD_BUS_VTABLE_PROPERTY_CONST),