summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorRenjaya Raga Zenta <ragazenta@gmail.com>2024-10-01 06:34:51 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2024-10-08 23:57:22 +0200
commit3a437f52b8874a947e4dd3fea9476a847d959d92 (patch)
treecbbc38dfe01b6a03e81e95c9cf38ad5befc47884 /src/core
parentcore/dbus: add assertions (diff)
downloadsystemd-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.c9
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)