]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/dbus.c
core: Verify systemd1 DBus method callers via polkit
authorStef Walter <stef@thewalter.net>
Wed, 6 Aug 2014 09:45:36 +0000 (11:45 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 18 Aug 2014 16:08:28 +0000 (18:08 +0200)
commit283868e1dcd8ea7475850d9c6e7d4722c473dd50
tree6334ed9b79e0c3c6242acfc050c00da4284ed7d1
parentf38857914ab5c9cc55aac05795e1886963a5fd04
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.)
src/core/dbus-job.c
src/core/dbus-manager.c
src/core/dbus-scope.c
src/core/dbus-unit.c
src/core/dbus.c
src/core/dbus.h
src/core/manager.h
src/core/org.freedesktop.systemd1.conf
src/core/org.freedesktop.systemd1.policy.in.in