D-Bus service, forking and shared service name

David Sommerseth dbus at lists.topphemmelig.net
Fri May 26 14:14:36 UTC 2017


Hi,

I'm working on a brand new project for OpenVPN Technologies.  We are
putting together a brand new client and want to move that client to make
use of D-Bus to simplify and enable tunnel management across many
different tools (systemd, NetworkManager, Cockpit, command line, various
GUI front-ends, etc).  We are fairly early in the development phase, and
we just want to ensure we do the right things as soon as possible to
avoid needing a massive refactoring later on.

Our goal is to have a "session manager" running, which the various
front-ends can connect to, to start a new VPN tunnel.  But we want each
tunnel to be an independent process, to ensure a failure in one tunnel
doesn't make all other parallel running tunnels to join the fall.

To make things a bit more complicated, there are events happening in
these tunnels which may require the users attention.  The user may not
be a privileged user, while the tunnel process must start as root to be
able to perform several privileged operations before the tunnel can be
established.  In addition we need to account for PKCS#11 (smart cards),
which is accessed via the initial end-user account as well.

We would prefer to have a unified bus name (net.openvpn) which is used
across all our processes.  Each configuration and running tunnel should
then have a unique object path, with their own set of methods.

So the question is if it is possible to have multiple "independent"
processes (forked from an initial main process) accessible via the same
bus name?  And how?

If I have understood the gdbus implementation correctly, several
processes may not own the same bus name.  So I believe some kind of
dispatcher which sends the requests further will be required.  But what
would be the best way to implement that?


-- 
kind regards,

David Sommerseth


More information about the dbus mailing list