From: Lennart Poettering Date: Fri, 23 May 2025 20:05:15 +0000 (+0200) Subject: polkit: reword 'Interactive authentication required' error X-Git-Tag: v258-rc1~487 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61d3133706f1116f688c6de761f7756bfc950e72;p=thirdparty%2Fsystemd.git polkit: reword 'Interactive authentication required' error I guess the current wording of "Interactive authentication required." is hard to grok for many users. Let's try to reword this, and say explicitly: 1. That this is a form of "access denied" error 2. That interactive auth could remedy this 3. But that the client disabled interactive auth I think these are the three primary elements the error msg needs to convey. I tried to distill this in a short error string with this. Fixes: #2081 --- diff --git a/src/shared/bus-polkit.c b/src/shared/bus-polkit.c index 93a3c7e6a4e..b3ee9f58477 100644 --- a/src/shared/bus-polkit.c +++ b/src/shared/bus-polkit.c @@ -323,7 +323,8 @@ static int async_polkit_read_reply(sd_bus_message *reply, AsyncPolkitQuery *q) { } else if (challenge) { log_debug("Polkit authorization for action '%s' requires interactive authentication, which we didn't allow.", a->action); q->error_action = TAKE_PTR(a); - sd_bus_error_set_const(&q->error, SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED, "Interactive authentication required."); + sd_bus_error_set_const(&q->error, SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED, + "Access denied as the requested operation requires interactive authentication. However, interactive authentication has not been enabled by the calling program."); } else { log_debug("Polkit authorization for action '%s' denied.", a->action); q->denied_action = TAKE_PTR(a);