summaryrefslogtreecommitdiffstats
path: root/src/core/dbus-util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2024-10-08 23:08:11 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-10-08 23:54:45 +0200
commitd0309467650be331362ec4196d720a791e3e7c23 (patch)
tree8396c928f596bb448899c7b8941361a55480b0c5 /src/core/dbus-util.c
parentmount: optimize mountinfo traversal by decoupling device discovery (diff)
downloadsystemd-d0309467650be331362ec4196d720a791e3e7c23.tar.xz
systemd-d0309467650be331362ec4196d720a791e3e7c23.zip
core/dbus: move bus_verify_xyz() to dbus-util.c
Diffstat (limited to 'src/core/dbus-util.c')
-rw-r--r--src/core/dbus-util.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
index b871d89368..28cb095cb2 100644
--- a/src/core/dbus-util.c
+++ b/src/core/dbus-util.c
@@ -177,6 +177,50 @@ int bus_verify_manage_units_async_full(
error);
}
+int bus_verify_manage_units_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+ return bus_verify_polkit_async(
+ call,
+ "org.freedesktop.systemd1.manage-units",
+ /* details= */ NULL,
+ &m->polkit_registry,
+ error);
+}
+
+int bus_verify_manage_unit_files_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+ return bus_verify_polkit_async(
+ call,
+ "org.freedesktop.systemd1.manage-unit-files",
+ /* details= */ NULL,
+ &m->polkit_registry,
+ error);
+}
+
+int bus_verify_reload_daemon_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+ return bus_verify_polkit_async(
+ call,
+ "org.freedesktop.systemd1.reload-daemon",
+ /* details= */ NULL,
+ &m->polkit_registry, error);
+}
+
+int bus_verify_set_environment_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+ return bus_verify_polkit_async(
+ call,
+ "org.freedesktop.systemd1.set-environment",
+ /* details= */ NULL,
+ &m->polkit_registry,
+ error);
+}
+
+int bus_verify_bypass_dump_ratelimit_async(Manager *m, sd_bus_message *call, sd_bus_error *error) {
+ return bus_verify_polkit_async(
+ call,
+ "org.freedesktop.systemd1.bypass-dump-ratelimit",
+ /* details= */ NULL,
+ &m->polkit_registry,
+ error);
+}
+
/* ret_format_str is an accumulator, so if it has any pre-existing content, new options will be appended to it */
int bus_read_mount_options(
sd_bus_message *message,