From 3a437f52b8874a947e4dd3fea9476a847d959d92 Mon Sep 17 00:00:00 2001 From: Renjaya Raga Zenta Date: Tue, 1 Oct 2024 11:34:51 +0700 Subject: [PATCH] core/dbus: pass transient unit name metadata to polkit Fixes #17224 --- src/core/dbus-manager.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 3538296d64b..54d4a1c1b81 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) -- 2.47.3