diff options
author | Stef Walter <stef@thewalter.net> | 2014-08-06 11:45:36 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-18 18:08:28 +0200 |
commit | 283868e1dcd8ea7475850d9c6e7d4722c473dd50 (patch) | |
tree | 6334ed9b79e0c3c6242acfc050c00da4284ed7d1 /src/core/dbus.h | |
parent | f38857914ab5c9cc55aac05795e1886963a5fd04 (diff) |
core: Verify systemd1 DBus method callers via polkit
DBus methods that retrieve information can be called by anyone.
DBus methods that modify state of units are verified via polkit
action: org.freedesktop.systemd1.manage-units
DBus methods that modify state of unit files are verified via polkit
action: org.freedesktop.systemd1.manage-unit-files
DBus methods that reload the entire daemon state are verified via polkit
action: org.freedesktop.systemd1.reload-daemon
DBus methods that modify job state are callable from the clients
that started the job.
root (ie: CAP_SYS_ADMIN) can continue to perform all calls, property
access etc. There are several DBus methods that can only be
called by root.
Open up the dbus1 policy for the above methods.
(Heavily modified by Lennart, making use of the new
bus_verify_polkit_async() version that doesn't force us to always
pass the original callback around. Also, interactive auhentication must
be opt-in, not unconditional, hence I turned this off.)
Diffstat (limited to 'src/core/dbus.h')
-rw-r--r-- | src/core/dbus.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/dbus.h b/src/core/dbus.h index bfb236ec8e..d04f5326c6 100644 --- a/src/core/dbus.h +++ b/src/core/dbus.h @@ -35,3 +35,8 @@ int bus_track_deserialize_item(char ***l, const char *line); int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l); int bus_foreach_bus(Manager *m, sd_bus_track *subscribed2, int (*send_message)(sd_bus *bus, void *userdata), void *userdata); + +int bus_verify_manage_unit_async(Manager *m, sd_bus_message *call, sd_bus_error *error); +int bus_verify_manage_unit_async_for_kill(Manager *m, sd_bus_message *call, sd_bus_error *error); +int bus_verify_manage_unit_files_async(Manager *m, sd_bus_message *call, sd_bus_error *error); +int bus_verify_reload_daemon_async(Manager *m, sd_bus_message *call, sd_bus_error *error); |