[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-dbus
Subject:    Re: Using D-Bus for private IPC
From:       Lawrence D'Oliveiro <ldo () geek-central ! gen ! nz>
Date:       2022-09-26 21:23:08
Message-ID: 20220927102308.43d8eeb4 () theon ! geek-central ! gen ! nz
[Download RAW message or body]

On Mon, 26 Sep 2022 14:34:00 -0400, Link Dupont wrote:

> It's a one-to-many model, so I'm not sure peer-to-peer would work.
> One process is the server, and there are many processes that are
> clients.

So you do the conventional thing, and have the server listen on a socket
for incoming connections. It can accept as many client connections as
it can handle.

Also if you use AF_UNIX sockets, you can query the credentials of the
process at the other end, and do authentication that way.

And on Mon, 26 Sep 2022 11:39:12 -0400, Link Dupont wrote:

> Is there a better way to create a private bus session from within a
> systemd unit, or is 'ExecStart=dbus-run-session /usr/bin/myprog' the
> recommended way to start up a private bus?

systemd also allows you to tell it you have a socket, and it will
automatically launch your listener on demand
<https://www.freedesktop.org/software/systemd/man/systemd.socket.html>.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic