User authentication to services

Olivier Andrieu oliv__a at users.sourceforge.net
Fri Jun 25 06:34:28 PDT 2004


 Kay Sievers [Thu, 24 Jun 2004]:
 > On Fri, Jun 18, 2004 at 04:25:14PM +0200, Olivier Andrieu wrote:
 > >  Kay Sievers [Fri, 18 Jun 2004]:
 > >  > > - the BaseName property replicates the functionality of 
 > >  > >   the GetServiceOwner, so we need to decide between these two.
 > >  > 
 > >  > I've replaced it by GetProperty and changed:
 > >  >   dbus/glib/dbus-gproxy.c:dbus_gproxy_new_for_service_owner() to call
 > >  >   it instead. (Hmm, needs to be tested if it still works)
 > >  > 
 > >  > Is it ok, this way? If yes, I will change the spec too.
 > > 
 > > What's wrong with having two different methods ? With a single
 > > GetProperty method the reply message carries either an INT32 or a
 > > STRING. That(s not very nice.
 > > 
 > >  > > - the name "GetServiceProperty" isn't a bit funny; it's a 
 > >  > >   property of the connection, not the service. 
 > >  > >   Suggest just "GetProperty"
 > > 
 > > But the base name is a property of the service.
 > 
 > Ok, here is a version that doesn't touch the existing code. It also
 > avoids the multiplexing method with the dynamic return type.
 > It just adds a "GetConnectionUnixUser" method similar to "GetServiceOwner".
 > The method is explained in the spec and a unit test in dispatch.c is
 > also added.

Thanks. Personally, I prefer it that way.

Nitpick: in bus_driver_handle_get_connection_unix_user in driver.c,
you could initialize the char * service to NULL. It's OK here because
the subsequent dbus_message_get_args has only one out argument, but if
it had several you'd have to initialize them before.

-- 
   Olivier



More information about the dbus mailing list