diff options
author | Renjaya Raga Zenta <ragazenta@gmail.com> | 2024-10-01 06:34:51 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2024-10-08 23:57:22 +0200 |
commit | 3a437f52b8874a947e4dd3fea9476a847d959d92 (patch) | |
tree | cbbc38dfe01b6a03e81e95c9cf38ad5befc47884 /src/core | |
parent | core/dbus: add assertions (diff) | |
download | systemd-3a437f52b8874a947e4dd3fea9476a847d959d92.tar.xz systemd-3a437f52b8874a947e4dd3fea9476a847d959d92.zip |
core/dbus: pass transient unit name metadata to polkit
Fixes #17224
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/dbus-manager.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 3538296d64..54d4a1c1b8 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -30,6 +30,7 @@ #include "format-util.h" #include "initrd-util.h" #include "install.h" +#include "locale-util.h" #include "log.h" #include "manager-dump.h" #include "os-util.h" @@ -1083,7 +1084,13 @@ static int method_start_transient_unit(sd_bus_message *message, void *userdata, if (mode < 0) return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Job mode %s is invalid.", smode); - r = bus_verify_manage_units_async(m, message, error); + r = bus_verify_manage_units_async_impl( + m, + name, + "start", + N_("Authentication is required to start transient '$(unit)'."), + message, + error); if (r < 0) return r; if (r == 0) |