summaryrefslogtreecommitdiffstats
path: root/src/shared/bus-polkit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2024-02-28 17:06:11 +0100
committerLennart Poettering <lennart@poettering.net>2024-03-13 10:42:13 +0100
commitb9632ec42f58366efe629683c4c351865272c2df (patch)
tree76bac0fe95d683a4e3d298631e283e4215a56c7a /src/shared/bus-polkit.h
parentMerge pull request #31731 from poettering/stat-is-set (diff)
downloadsystemd-b9632ec42f58366efe629683c4c351865272c2df.tar.xz
systemd-b9632ec42f58366efe629683c4c351865272c2df.zip
polkit: allow checking if we already acquired some action
This adds a new helper that basically just wraps async_polkit_query_have_action() and allows calling this without actually triggering a PK authentication operation: it just checks if we aleady have acquired an action or not.
Diffstat (limited to 'src/shared/bus-polkit.h')
-rw-r--r--src/shared/bus-polkit.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/bus-polkit.h b/src/shared/bus-polkit.h
index 4e2c1d3551..3394c23a2b 100644
--- a/src/shared/bus-polkit.h
+++ b/src/shared/bus-polkit.h
@@ -30,3 +30,5 @@ static inline int varlink_verify_polkit_async(Varlink *link, sd_bus *bus, const
.name = "allowInteractiveAuthentication", \
.type = JSON_VARIANT_BOOLEAN, \
}
+
+bool varlink_has_polkit_action(Varlink *link, const char *action, const char **details, Hashmap **registry);