From ceb242292630b4633aa707b565585a1e8bcbfeb8 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 6 Apr 2015 20:25:56 +0200 Subject: polkit: rename bus_verify_polkit() to bus_test_polkit() and make it strictly non-interactive Interactive authorization should only happen asynchronously, hence disallow it in synchronous bus_verify_polkit(), and rename it to bus_test_polkit(). This way even if the bus message header asks for interactive authorization, we'll ask for non-interactive authorization which is actually the desired behaviour if CanSuspend, CanHibernate and friends, which call this function. --- src/libsystemd/sd-bus/bus-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsystemd/sd-bus/bus-util.h') diff --git a/src/libsystemd/sd-bus/bus-util.h b/src/libsystemd/sd-bus/bus-util.h index 9f048711de..cc16a9d694 100644 --- a/src/libsystemd/sd-bus/bus-util.h +++ b/src/libsystemd/sd-bus/bus-util.h @@ -69,7 +69,7 @@ int bus_name_has_owner(sd_bus *c, const char *name, sd_bus_error *error); int bus_check_peercred(sd_bus *c); -int bus_verify_polkit(sd_bus_message *call, int capability, const char *action, bool interactive, uid_t good_user, bool *_challenge, sd_bus_error *e); +int bus_test_polkit(sd_bus_message *call, int capability, const char *action, uid_t good_user, bool *_challenge, sd_bus_error *e); int bus_verify_polkit_async(sd_bus_message *call, int capability, const char *action, bool interactive, uid_t good_user, Hashmap **registry, sd_bus_error *error); void bus_verify_polkit_async_registry_free(Hashmap *registry); -- cgit v1.2.3-54-g00ecf