]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/dbus: pass transient unit name metadata to polkit 34651/head
authorRenjaya Raga Zenta <ragazenta@gmail.com>
Tue, 1 Oct 2024 04:34:51 +0000 (11:34 +0700)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Oct 2024 21:57:22 +0000 (06:57 +0900)
Fixes #17224

src/core/dbus-manager.c

index 3538296d64b7d2720b3d15de27fc502679d78e2c..54d4a1c1b8153ef8bbb384802eb1dd7f66d453c3 100644 (file)
@@ -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)