From 0161a3c5637a0c0092bf54c436bb3d6508d7df26 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Fri, 9 May 2014 20:03:02 +0200 Subject: SBUS: Add an async request to retrieve the caller ID MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds an async request sbus_get_sender_id_{send,recv} that allows retrieval of UID based on "sender" as returned by dbus_message_get_sender(). The UID is an int64_t to be able to use "-1" to as a fallback value for uknown or error cases. The unit test is added as a standalone one, not part of the sbus_tests because the request, and by extension the unit test relies on being connected to the system bus, which is very unlikely to work in a build system. Reviewed-by: Pavel Březina Reviewed-by: Stef Walter --- src/sbus/sssd_dbus.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/sbus/sssd_dbus.h') diff --git a/src/sbus/sssd_dbus.h b/src/sbus/sssd_dbus.h index 8ba108ee3..15ca52118 100644 --- a/src/sbus/sssd_dbus.h +++ b/src/sbus/sssd_dbus.h @@ -27,6 +27,7 @@ struct sbus_interface; struct sbus_request; #include +#include #include "util/util.h" typedef int (*sbus_msg_handler_fn)(struct sbus_request *dbus_req, @@ -187,6 +188,7 @@ void sbus_conn_send_reply(struct sbus_connection *conn, * or sbus_request_fail() functions. */ struct sbus_request { + int64_t client; struct sbus_connection *conn; DBusMessage *message; struct sbus_interface *intf; -- cgit