[systemd-devel] Questions regarding dbus started via systemd --user

Lennart Poettering mzqohf at 0pointer.de
Mon Feb 2 15:02:20 PST 2015

On Thu, 08.01.15 17:42, Dimitri John Ledkov (dimitri.j.ledkov at intel.com) wrote:

> > It also means you can't use D-Bus names as single-instance mutexes to
> > avoid "last write wins, earlier writes are lost" (or worse!) data
> > corruption in the home directory, because it allows more than one D-Bus
> > session to share a home directory, even in the absence of NFS or
> > whatever. This was meant to be one of the uses of D-Bus name ownership
> > semantics, so it's a pity that it has never worked in the general case.
> >
> > Finally, there is no canonical list of the situations that the session
> > bus does and doesn't support, so whenever someone raises a bug or
> > feature request about one of the corner cases, nobody knows whether it's
> > a bug or a feature request or just wrong. Typical corner cases include:
> True, hence we only enabled user session management with upstart on
> the graphical logins.
> However, we also included facilities to join/part a given user session.
> Thus one can join a given upstart session id, and control it, query
> it's environment and move into that environment.
> (Not automated, but there are qa scripts that do that for
> validation)

I'd ver very careful with concepts of "joining" and "parting"
sessions. A session is made up of tons of different things, and some
are hard to see or even impossible to alter. For example, if you have
a MAC system like selinux you cannot easily patch around in the labels
during runtime if you want to change it orthogonally to normal process
inheritance. But it's not just that. For example, you cannot override
audit login/session ids after you wrote them once for a process and
its children. This means, if you introduce concepts for joining and
parting, then your audit traces start to deviate from the rest of the
system's idea of a session, and then things get really annoying.

I'd really try to stay away from concepts of parting/joining, it's
hard to know and patch all process attribs that requires, and even
impossible for some of them.


Lennart Poettering, Red Hat

More information about the dbus mailing list