Is it possible to know which user issued the call that is being
executed in a service? I'm using the glib bindings. I have have seen
that there is a call dbus_bus_get_unix_user but i can't figure out how
to get the arguments to pass to this function from within the method
that is being called.
On Thu, 2005-08-11 at 15:58 +0200, Diego González wrote:
> Is it possible to know which user issued the call that is being
> executed in a service? I'm using the glib bindings.
Not with the GLib bindings at the moment, no. This is one thing that
would fit cleanly into the "conversation" concept being discussed in
another thread. Presumably if you are writing a service which wants to
check sender uids, the sender will be invoking multiple methods, and
it's cleaner to do the check in BeginConversation once instead of for
every method invocation.
So let's see how that thread turns out; if we run into problems and it
looks difficult to implement, we can probably do a short-term hack like
dbus_g_method_get_context (void) and then
dbus_g_method_context_get_sender (DBusGMethodContext *ctx).