getting the user that issued a call

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

getting the user that issued a call

Diego González
Hi

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.

Diego
--
dbus mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/dbus
Reply | Threaded
Open this post in threaded view
|

Re: getting the user that issued a call

Colin Walters
On Thu, 2005-08-11 at 15:58 +0200, Diego González wrote:
> Hi
>
> 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).


--
dbus mailing list
[hidden email]
http://lists.freedesktop.org/mailman/listinfo/dbus

signature.asc (196 bytes) Download Attachment