summaryrefslogtreecommitdiff
path: root/src/systemd
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-15 20:08:51 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-15 20:08:51 +0200
commitdef9a7aa0182e5ecca3ac61b26f75136a5c4f103 (patch)
treecb9da3fa3ad63f8c9e62c883cf821f23295c74d3 /src/systemd
parent4311fa08fe7f3e702a2adb569fe20fb023a4b746 (diff)
sd-bus: add API to check if a client has privileges
This is a generalization of the vtable privilege check we already have, but exported, and hence useful when preparing for a polkit change. This will deal with the complexity that on dbus1 one cannot trust the capability field we retrieve via the bus, since it is read via /proc/$$/stat (and thus might be out-of-date) rather than directly from the message (like on kdbus) or bus connection (as for uid creds on dbus1). Also, port over all code to this new API.
Diffstat (limited to 'src/systemd')
-rw-r--r--src/systemd/sd-bus.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index 79566d210..3eedb4450 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -282,6 +282,7 @@ int sd_bus_emit_interfaces_removed_strv(sd_bus *bus, const char *path, char **in
int sd_bus_emit_interfaces_removed(sd_bus *bus, const char *path, const char *interface, ...) _sd_sentinel_;
int sd_bus_query_sender_creds(sd_bus_message *call, uint64_t mask, sd_bus_creds **creds);
+int sd_bus_query_sender_privilege(sd_bus_message *call, int capability);
/* Credential handling */