]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: restrict Dump*() to privileged callers or ratelimit 27438/head
authorLuca Boccassi <bluca@debian.org>
Thu, 27 Apr 2023 22:23:30 +0000 (23:23 +0100)
committerLuca Boccassi <bluca@debian.org>
Fri, 19 May 2023 14:18:23 +0000 (15:18 +0100)
commitd936595672cf3ee7c1c547f8fd30512f82be8784
treed9828ff3c9b9387e78013adbb3f7ee824669f8cc
parent53d6987f9e46927bbc9ad683c091c070ebe06658
manager: restrict Dump*() to privileged callers or ratelimit

Dump*() methods can take quite some time due to the amount of data to
serialize, so they can potentially stall the manager. Make them
privileged, as they are debugging tools anyway. Use a new 'dump'
capability for polkit, and the 'reload' capability for SELinux, as
that's also non-destructive but slow.

If the caller is not privileged, allow it but rate limited to 10 calls
every 10 minutes.
man/org.freedesktop.systemd1.xml
man/systemd-analyze.xml
src/core/dbus-manager.c
src/core/dbus.c
src/core/dbus.h
src/core/manager-serialize.c
src/core/manager.c
src/core/manager.h
src/core/org.freedesktop.systemd1.policy.in
test/units/testsuite-65.sh