summaryrefslogtreecommitdiffstats
path: root/src/shared/bus-polkit.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:19:03 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-16 18:19:03 +0000
commit2b689e3af421bdd35ccd34cdc733d4d8a40843b3 (patch)
treedc0754b353914d026743560b8fa8977dc407fe99 /src/shared/bus-polkit.c
parentReleasing progress-linux version 256.1-2~progress7.99u1. (diff)
downloadsystemd-2b689e3af421bdd35ccd34cdc733d4d8a40843b3.tar.xz
systemd-2b689e3af421bdd35ccd34cdc733d4d8a40843b3.zip
Merging upstream version 256.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/shared/bus-polkit.c')
-rw-r--r--src/shared/bus-polkit.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/shared/bus-polkit.c b/src/shared/bus-polkit.c
index 0382d0b..58cffb6 100644
--- a/src/shared/bus-polkit.c
+++ b/src/shared/bus-polkit.c
@@ -786,11 +786,13 @@ int varlink_verify_polkit_async_full(
if (r != 0)
log_debug("Found matching previous polkit authentication for '%s'.", action);
if (r < 0) {
- /* Reply with a nice error */
- if (sd_bus_error_has_name(&error, SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED))
- (void) varlink_error(link, VARLINK_ERROR_INTERACTIVE_AUTHENTICATION_REQUIRED, NULL);
- else if (ERRNO_IS_NEG_PRIVILEGE(r))
- (void) varlink_error(link, VARLINK_ERROR_PERMISSION_DENIED, NULL);
+ if (!FLAGS_SET(flags, POLKIT_DONT_REPLY)) {
+ /* Reply with a nice error */
+ if (sd_bus_error_has_name(&error, SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED))
+ (void) varlink_error(link, VARLINK_ERROR_INTERACTIVE_AUTHENTICATION_REQUIRED, NULL);
+ else if (ERRNO_IS_NEG_PRIVILEGE(r))
+ (void) varlink_error(link, VARLINK_ERROR_PERMISSION_DENIED, NULL);
+ }
return r;
}