D-Bus User Bus

Lennart Poettering mzqohf at 0pointer.de
Wed May 19 19:11:13 PDT 2010


B1;2401;0cOn Wed, 19.05.10 20:18, Thiago Macieira (thiago at kde.org) wrote:

> Em Quarta-feira 19. Maio 2010, às 19.50.57, Colin Walters escreveu:
> > 2010/5/17 Havoc Pennington <hp at pobox.com>:
> > > The longstanding issue with a user bus is that it doesn't really solve
> > > anything,
> > 
> > It makes things work for people who want to use cron to schedule jobs
> > that need to access e.g. gnome-keyring.  (Though really, we should
> > also have DISPLAY set).  Also logging in via ssh.
> 
> I think what we're looking for here is an "all-sessions user overlay".
> 
> That is, there's this special bus that belongs to a user and the session 
> busses connect to. One session does not see services in another and cannot 
> communicate with it. However, services in the session do see the services in 
> the user bus overlay.
> 
> This would require that session buses coordinate the assignment of unique 
> connection IDs, so that they are globally unique.
> 
> This way, we could move services that are supposed to be singletons into the 
> user bus, but no client would require code changes.
> 
> At an extreme, this could be implemented entirely in the client (binding) 
> code, by connecting to two buses and hiding the fact that there are two, but 
> I'm pretty sure it wouldn't be long until a three-way communication situation 
> is found and it breaks (A tells B to talk to C, but B and C can't talk).
> 
> 
> Another way to look at this is to have only a user bus, but introduce a 
> session or domain concept inside it. Connections in one domain can only see 
> connections in that domain, plus the global domain. Access to a domain is 
> granted by knowing the domain's "secret" at connection time (like an ID at 
> handshake or by connecting to a special Unix socket whose name is random and 
> is saved in an environment variable).

You are writing this as if there was any value in strictly seperating
multiple sessions of the same user from each other. But there is none.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the dbus mailing list