]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
updatectl: Apply --no-ask-password argument to polkit agent
authorPhilip Withnall <pwithnall@gnome.org>
Thu, 21 May 2026 10:40:19 +0000 (11:40 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 May 2026 12:54:36 +0000 (14:54 +0200)
Accidentally missed out of commit
8c0f9073c7da808461acfc016cc291e4aba9c1a2.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Fixes: 8c0f9073c7da808461acfc016cc291e4aba9c1a2
src/sysupdate/updatectl.c

index bafc41c6ae0c73f36642505aea7638ef6137723b..cd41aeb9007f910861f9373dc059b78881f43bfe 100644 (file)
@@ -1757,8 +1757,7 @@ static int run(int argc, char *argv[]) {
         if (r < 0)
                 return bus_log_connect_error(r, arg_transport, RUNTIME_SCOPE_SYSTEM);
 
-        if (arg_transport == BUS_TRANSPORT_LOCAL)
-                polkit_agent_open();
+        (void) polkit_agent_open_if_enabled(arg_transport, arg_ask_password);
 
         (void) sd_bus_set_allow_interactive_authorization(bus, arg_ask_password);